Workspaces
A workspace is a directory hierarchy with three directories at its root:
• src contains Go source files
• pkg contains package objects
• bin contains executable commands
The GOPATH environment variable
localhost:dll dll$ cat ~/.bash_profile
export PATH=${PATH}:~/Library/Android/sdk/platform-tools:/usr/local/go/bin
export GOPATH=$HOME/gowork
build、install and run that program with the go tool
//build
go build dll/stringutil
//install
go install dll/hello
//run
$GOPATH/bin/hello
最后
以上就是俊秀跳跳糖最近收集整理的关于How to Write Go Code的全部内容,更多相关How内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复