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

Go语言入门系列1:安装,How to Write Go Code

2017-06-30 10:36 399 查看
https://golang.org/doc/code.htmlsrc contains Go source files,pkg contains package objects, andbin contains executable commands.The go tool builds source packages and installs the resulting binaries to the pkg and bin directories.需要先设置:The GOPATH specifies the location of your workspace. GOPATH must not be the same path as your Go installation.安装下载https://golang.org/dl/https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gztar -C /usr/local/ -xzf go1.8.3.linux-amd64.tar.gzexport PATH=$PATH:/usr/local/go/bin GOROOT must be set when installing to a custom location. 所以最好安装在/usr/local目录下为什么要使用 Go 语言?Go 语言的优势在哪里?部署简单。我发现我花了四年时间锤炼自己用 C 语言构建系统的能力,试图找到一个规范,可以更好的编写软件。结果发现只是对 Go 的模仿。缺乏语言层面的支持,只能是一个拙劣的模仿。对于大多数后台应用场景,选择Golang是极为明智的选择。 如果你是C爱好者,强烈建议你学习和使用Go。Go可以调用C/C++程序你用来学89个C++高级特性的时间,估计已经用Go写了64个开源项目了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: