This is a creation in Article, where the information may have evolved or changed.
Go mascot
The go language is the emerging back-end development language of Google, and the people I know use it all. After the previous period of study, make a summary.
The main advantages of the Go language
Engineered
- Force code style, through the GOFMT tool, facilitate team collaboration.
- Dependency Management language Level support (Gopath), similar to the use of the Maven,gradle tool in Java.
- Container technology Docker is written in go, and the go language has a great affinity for container applications, such as cross-compiling to package only executable programs, greatly reducing the volume of containers. Since this is largely the advantage of Docker, it is half-way.
- Cross-compiling is a convenient executable code for the target OS, making it more efficient to make command-line gadgets.
- The open source ecosystem is rich enough to emerge with a large number of outstanding projects and third-party components. Reference: Https://github.com/avelino/awesome-go
Language itself
- Goroutine brings a tremendous increase in performance and development speed to concurrent programming, eliminating the need for complex multithreaded code.
- Interface is non-intrusive. Go interface is more than the function rather than the descent, canceled the Implements keyword, carried out the Deng Xiaoping theory "as long as can catch mouse is a good cat."
- Forced use of UTF-8 encoding, garbled problem reduction
- Fewer keywords, clear semicolons, and simple grammar.
- Go comes with packages that meet the needs of most back-end development, which is a "back-up advantage." For example, if the log comes with a package is sufficient, and Java does not introduce log4j is difficult to flexible log. Another example is to send HTTP requests, only need to use the Net/http package is enough, Java needs to introduce apache-httpclient.
Some questions about the current go language:
- The IDE is not rich enough, currently using the best experience is IntelliJ idea installation Golang-plugin with delve do Debug. However, the debug experience is somewhat lacking, such as not being tracked on a row-by-line basis. Reference Https://github.com/go-lang-plugin-org/go-lang-idea-plugin
- The version is still in intense iterations, and there may be significant updates in the future that are not stable enough.