This is a creation in Article, where the information may have evolved or changed.
Go Language Advantages:
• Static language, strongly typed. Static compilation can help us to check out a lot of errors, the strong type of go and even perverted to not support implicit type conversion.
Gofmt, it's supposed to be the first one I know. The language of the Uniform Format Code tool is provided. With GOFMT, everyone's code is the same, there is no curly braces in the end or a new line of this kind of egg-like code style discussed. Because the code style is the same, it's easy to see the code of Go.
• Inherently parallel support, because Goroutine and channel, with go write distributed applications, write concurrency program exception easy. Without the callback of the egg, the code logic is fragmented and the code logic is sequential. • Performance, go performance may not be able to catch up with c,c++ and openresty, but it's also pretty tough. In our project, a go process is now deployed on a single machine, fully capable of doing what was done in the previous 200 Python processes, with lower CPU and mem usage.
• Operations deployment, compiled directly into binary, thrown onto the server, more than Python needs to install a bunch of environment that is simply too much. Of course, if there are CGO, we also need to throw the corresponding dynamic library to the past.
• Development efficiency, although go is a static language, I personally feel that the development efficiency is really very high, intuition above python. For me personally, the best example is that I quickly developed a lot of open source components, such as Ledisdb,go-mysql, with go, and the first versions were done in a very short time.
Places to be aware of:
1. Overflow of integer data; The maximum value for an integer of type int8 is 127 if the plus one is-128. 2. Special type: plural: The complex number is actually composed of two floating-point numbers, one representing the real part, one representing the virtual
Department. 3.Go language stipulation, function, control structure, etc. the opening brace "{" must and function declaration
or control structure on the same line. If you place the opening brace in the function declaration, the control statement's
The next line, the compiler automatically adds a curly brace to the front of the left curly brace, which can cause the process
The sequence exception. 4.Go support for multiple languages. 5. The first letter of the function name is lowercase, that is, the private function name is capitalized, that is, public