Re: [go-nuts] How to dynamically update golang plugin(so file)?

2017-09-06 Thread Ian Lance Taylor
On Tue, Sep 5, 2017 at 10:03 PM, Jason Wang wrote: > > I have the following two files: > > // hello.go > package main > > import ( > "fmt" > ) > > func Hello() { > fmt.Println("hello") > } > > func main() {} > > > build as plugin: `go build -buildmode=plugin hello.go` > > //

[go-nuts] How to dynamically update golang plugin(so file)?

2017-09-06 Thread Jason Wang
I have the following two files: // hello.go package main import ( "fmt" ) func Hello() { fmt.Println("hello") } func main() {} build as plugin: `go build -buildmode=plugin hello.go` // main.go package main import ( "log" "plugin" "time" ) func main() { for { log.Println("start load