Skip to content

Commit 33024f3

Browse files
committed
Added some godoc
1 parent afa95b4 commit 33024f3

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

example/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Smoke test/example demonstrating accessing global variables and functions from a self compiled library.
12
package main
23

34
import (

examplelibpcap/main.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Example using libpcap to read packets from a networkdevice and decode them with gopacket.
12
package main
23

34
import (

fakecgo/cgo.go

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
Package fakecgo fakes necessary functionality to support calling C-code (TLS initialization for main thread and subsequent threads).
3+
4+
Usage
5+
6+
Just import this library with
7+
import _ "github.com/notti/nocgo/fakecgo"
8+
and enjoy the side effects (e.g., you can't use cgo any longer) :)
9+
*/
110
package fakecgo
211

312
import (

relink/relink.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// This binary can rewrite static (go) binaries to include interp and use symbols from dynamic libraries
2-
// Symbols must be name symbol name__dynload
3-
1+
// [not needed] Relink rewrites static (go) binaries to include interp and use symbols from dynamic libraries.
2+
//
3+
// Symbols must be named <symbol name>__dynload
44
package main
55

66
import (

test/build.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Test generator and tests
12
package main
23

34
import (
@@ -118,13 +119,13 @@ func (a Arguments) Value() string {
118119
}
119120

120121
type Test struct {
121-
Name string
122-
Ret Value
123-
Arguments Arguments
124-
CgoPre, CgoPost string
122+
Name string
123+
Ret Value
124+
Arguments Arguments
125+
CgoPre, CgoPost string
125126
NOCGOPre, NOCGOPost string
126-
Bench bool
127-
Multitest bool
127+
Bench bool
128+
Multitest bool
128129
}
129130

130131
func (t Test) NOCGO() string {

0 commit comments

Comments
 (0)