我正在尋找一種在程序運行時修改部分程序的方法。我編寫這段代碼僅作為示例。假設我們有這樣一段代碼:for { t := time.Now() fmt.Print(t.Minute(), ":", t.Second(), " ") testdll.Testf() time.Sleep(time.Second * 2)}和package testdllimport ( "fmt")//Testf func Testf() { fmt.Println("hello I'm version 1")}當testdll更新到版本2并重建時,是否有可能在運行時得到這個結果?14:29 hello I'm version 114:31 hello I'm version 114:33 hello I'm version 114:35 hello I'm version 214:37 hello I'm version 214:39 hello I'm version 2
- 1 回答
- 0 關注
- 136 瀏覽
添加回答
舉報
0/150
提交
取消