我是靠谱客的博主 俊秀跳跳糖,这篇文章主要介绍How to Write Go Code,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(41)

评论列表共有 0 条评论

立即
投稿
返回
顶部