把別人的Tcl/Tk代碼加入到Go語言裏12 遊戲5 畫圖案?

a 首先打開網頁 http://wiki.tcl.tk/4206
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代碼文件,運行效果以下

相關文章
相關標籤/搜索