Building an offline Go Programming Guide---gotour

Source: Internet
Author: User
Tags install go mercurial
This is a creation in Article, where the information may have evolved or changed.

To better promote the go language, Google has built a browser-based interactive go Programming Guide on its own website and Appspot-gotour, related websites:

    • Gotour--english Version
    • gotour--Chinese Version

This tutorial is very simple and easy to learn, divided into three parts:
The first part mainly introduces the basic concept of Go language, including package, import, function, variable, condition, loop, pointer, struct, slice, Map, range and so on.
The second part mainly introduces methods, interfaces, Error, Web server, image processing and so on.
The third part mainly introduces concurrency, Goroutine, channel, buffer channel, range and close, select and so on.

Each section provides a number of examples where all code can be run directly on the web. In the following sections, you can write your code directly in the browser edit box provided in the tutorial, and click on the button "Run" in the top left corner to view your coding results. For beginners, this online tutorial is really the best practise for learning go language programming:

However, I will not let the programmer so happy to use the Google services, the above two sites are seriously contaminated domain names, often inaccessible or very unstable. Fortunately, this tutorial provides a local offline version of the build, which can be run as a standalone Web program without Internet access. When the tutorial runs locally, it builds and compiles the code using the on-premises environment, which runs faster and includes some enhancements to the experience that are not available in the sandbox version.

So I suggest that all programmers who want to learn go will build this go language tutorial based on their local environment. The build process is simple:

    • To install the Go locale, refer to the Go website guide. The following is a brief introduction:
      • For OS X, you can install it directly using the Brew install Go, which is installed in the/usr/local/cellar/go directory.
      • For Linux (Ubuntu), download the compiled installation package via wget http://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz and then Tar-c/USR/LOCAL-XZF Go1.0.3.linux-amd64.tar.gz.
      • Set environment variables to ensure that the GO command can be executed at the command line.
    • Install another Distributed management tool Hg (Mercurial), the introduction of Hg refer to http://mercurial.selenic.com.
      • For OS X, you can install with the brew install Hg.
      • For Linux (Ubuntu), you can use the sudo apt-get install mercurial installation.
      • After the installation is complete, confirm that the HG command can be found at the command line.
    • Install Go Language English tutorial: sudo go get code.google.com/p/go-tour/gotour
    • Install Go language Chinese tutorial: Go get Bitbucket.org/mikespook/go-tour-zh/gotour
    • In the command line execution Gotour, in the browser address input: http://127.0.0.1:3999, you can enter the tutorial learning interface.

Shong's Open

Related Article

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.