This is a creation in Article, where the information may have evolved or changed.
Go Language Introduction
Official
- Website: http://golang.org
- Source: Http://github.com/golang/go
Go language Features
- Easy to learn, similar to the C language style
- Built-in goroutine mechanism, language level support concurrency
- Go now has a large number of standard libraries built in
- Cross-platform compilation
- Built-in C support with rich C-language libraries
Learning Community
- Official website http://golang.org/project/
- Golang Chinese Community http://studygolang.com/
- Golang China http://golangtc.com
Open Source Projects
- Docker http://www.docker.com/
Docker is an open-source application container engine
- ETCD https://github.com/coreos/etcd/
ETCD is a highly available key/value storage system that is used primarily for sharing configuration and service discovery
- NSQ https://github.com/bitly/nsq/
A real-time distributed messaging platform
- More open source projects: https://github.com/golang/go/wiki/Projects/
Recommended Learning Materials
- Official documents
- Official website: http://golang.org/doc/
- Domestic visit: http://godoc.golangtc.com/doc/
- Open Source Book "Go Web Programming"
Https://github.com/astaxie/build-web-application-with-golang
- Chinese translation of Go language
Http://github.com/Go-zh/go
- Go developer tips for Go beginners http://segmentfault.com/a/1190000000654351
Go installation and configuration
- Three environment variables in go
- Goroot
The path to the go language installation, such as Mac:/usr/local/go, similar to Java_home in Java
- Gopath
Gopath represents the address where the package resides and can be set more than one.
Assume: Gopath=~/go1:~/go2,goroot=/usr/local/go, the package is referenced in the code: Github.com/bitly/nsq/util
Then: Go at compile time will be in order to find the source code in the following directory:
~/go1/src/github.com/bitly/nsq/util
~/go2/src/github.com/bitly/nsq/util
/usr/local/go/src/github.com/bitly/nsq/util
- PATH
Path to the executable instance
- Go command
- Learning Document Https://github.com/hyper-carrot/go_command_tutorial
- Go Display command-related help information
- Go build compiles packages and dependencies that generate executables in the directory where the command is executed
- Go clean cleanup compiles the generated files
- Go env display GO environment variable
- Go FMT Format code
- Go install compile and install packages, dependencies
- Go run to compile and run the Go program
- Go get Gets or updates the code packages and their dependencies, and compiles and installs them
- Run test code for GO test
- Go Web Development Framework
- Beego http://beego.me/
MVC framework, the author of the Chinese, the framework of Chinese documents rich, large user groups, easy to communicate. Learning difficulty is low.
- Revel http://revel.github.io/
The idea comes from the Java play Framework, which is relatively beego difficult.
- Martini http://martini.codegangsta.io/
Simple and flexible, a lot of use of reflection, beginners difficult to get started.