Golang into the Pit guide

Source: Internet
Author: User

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")

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.