First, go language introduction
Google is the go language of the pro-dad, in 2009 by Thompson, Pike, Robert Griesemer and other people launched, the vast number of open source technology enthusiasts, hackers to help complete. The go language comes from the birth of the star Halo, to remove the pro-dad is Google does not say, developer Thompson has developed UNIX and the C language derived from the B language; Pike: It was a UNIX team at Bell Labs and a member of the Plan 9 operating system. He has worked with Thompson for many years and has been creating a widely used UTF-8 character encoding.
The advantages of the Go language
Most programming languages can do, the go language can be implemented, the go language is not inherited, natural support concurrency, you can directly generate static files, in addition to glibc, do not rely on other libraries. The go language is ideal for server programming, network programming, and cloud platform development. Has a superior performance for distributed processing. As a static language, this is comparable to C, C + + operating efficiency, but also a dynamic language sense, with a number of dynamic language such as Python, Ruby and other development efficiency.
Third, the Go language installation
Go language is open source project, so various platform can install go language, I so use Ubuntu platform, use the tool is Goland. First, we go to the Go language Chinese network download the installation package, select the appropriate installation package for our platform, and then unzip, set the Go language path, the official recommended Linux platform is placed under the/usr/local/go directory. Set the path, under Ubuntu export path= $PATH:/usr/local/go. under Windows Setup is relatively simple, we can Baidu by ourselves. after setting up, you need to set Gopath, but also for everyone to create the directory of Go file, why need to set Gopath, we later in the project management will do a detailed introduction, now we just need to install a Go language environment can, first run a Hello program, Take a look at the difference between the go language and other languages.
Implementation of the 四、一个 Hello World program
Directly on the source:
Package Main
Import "FMT"
Func Main () {
Fmt. Println ("Hello World")
}