a 首先打開網頁 http://wiki.tcl.tk/10287
git
b 把網頁裏提到的tcl/tk代碼複製到以下go源代碼的init_script字符串常量裏github
package mainspa
import "github.com/nsf/gothic"
命令行
const init_script = `ip
#把Tcl/Tk源代碼複製到這個常量裏
字符串
`it
func main() {import
ir := gothic.NewInterpreter(init_script)im
<-ir.Doneimg
}
c 在LiteIDE裏或命令行裏go run go代碼文件,運行效果以下