您的位置:首页 > 编程语言 > Go语言

How to Write Go Code

2016-12-06 17:29 369 查看

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  go