Go Language Introduction

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

Go Language Introduction

  1. Official

    1. Website: http://golang.org
    2. Source: Http://github.com/golang/go
  2. Go language Features

    1. Easy to learn, similar to the C language style
    2. Built-in goroutine mechanism, language level support concurrency
    3. Go now has a large number of standard libraries built in
    4. Cross-platform compilation
    5. Built-in C support with rich C-language libraries
  3. Learning Community

    1. Official website http://golang.org/project/
    2. Golang Chinese Community http://studygolang.com/
    3. Golang China http://golangtc.com
  4. Open Source Projects

    1. Docker http://www.docker.com/
      Docker is an open-source application container engine
    2. ETCD https://github.com/coreos/etcd/
      ETCD is a highly available key/value storage system that is used primarily for sharing configuration and service discovery
    3. NSQ https://github.com/bitly/nsq/
      A real-time distributed messaging platform
    4. More open source projects: https://github.com/golang/go/wiki/Projects/
  5. Recommended Learning Materials

    1. Official documents
      • Official website: http://golang.org/doc/
      • Domestic visit: http://godoc.golangtc.com/doc/
    2. Open Source Book "Go Web Programming"
      Https://github.com/astaxie/build-web-application-with-golang
    3. Chinese translation of Go language
      Http://github.com/Go-zh/go
    4. Go developer tips for Go beginners http://segmentfault.com/a/1190000000654351

Go installation and configuration

  1. Three environment variables in go
    1. Goroot
      The path to the go language installation, such as Mac:/usr/local/go, similar to Java_home in Java
    2. Gopath
      Gopath represents the address where the package resides and can be set more than one.
      Assume: Gopath=~/go1:~/go2,goroot=/usr/local/go, the package is referenced in the code: Github.com/bitly/nsq/util
      Then: Go at compile time will be in order to find the source code in the following directory:
      ~/go1/src/github.com/bitly/nsq/util
      ~/go2/src/github.com/bitly/nsq/util
      /usr/local/go/src/github.com/bitly/nsq/util
    3. PATH
      Path to the executable instance
  2. Go command
    • Learning Document Https://github.com/hyper-carrot/go_command_tutorial
    • Go Display command-related help information
    • Go build compiles packages and dependencies that generate executables in the directory where the command is executed
    • Go clean cleanup compiles the generated files
    • Go env display GO environment variable
    • Go FMT Format code
    • Go install compile and install packages, dependencies
    • Go run to compile and run the Go program
    • Go get Gets or updates the code packages and their dependencies, and compiles and installs them
    • Run test code for GO test
  3. Go Web Development Framework
    1. Beego http://beego.me/
      MVC framework, the author of the Chinese, the framework of Chinese documents rich, large user groups, easy to communicate. Learning difficulty is low.
    2. Revel http://revel.github.io/
      The idea comes from the Java play Framework, which is relatively beego difficult.
    3. Martini http://martini.codegangsta.io/
      Simple and flexible, a lot of use of reflection, beginners difficult to get started.
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.