a 首先打開網頁 http://wiki.tcl.tk/13680git
b 把網頁裏提到的每一段代碼複製到go源代碼的init_script字符串常量裏github
【注意,直到最後一段代碼結尾是spa
bind . <Up> {exec wish $argv0 &; exit}ip
若是我沒數錯的話一共是7段代碼,前面是6個proc代碼段,字符串
最後一段代碼裏倒數2行代碼能夠去除掉】
it
package mainimport
import "github.com/nsf/gothic"
im
const init_script = `img
#把Tcl/Tk源代碼複製到這個常量裏
bind
`
func main() {
ir := gothic.NewInterpreter(init_script)
<-ir.Done
}
c 在LiteIDE裏run ,運行效果以下