goso
func F(d int, s string) {
fmt.Println(s)
fmt.Println(d)
}
go build -gcflags="all=-N -l" -buildmode=plugin 2.go
go build -ldflags='-s -w' .
https://github.com/vladimirvivien/go-cshared-examples
func main() {
p, err := plugin.Open("2")
if (err != nil){
panic(err)
}
f, err := p.Lookup("F")
if (err != nil){
panic(err)
}
F, ok := f.(func (d int, s string))
if (!ok){
return
}
F(99, "jhe")
}