Go Language Introductory Material

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

Go language, released since 2012 1.0, so far 1.7, after 5 years. The tools and ecology of go have been perfected, and here is a summary of the introductory materials you can find in the Go language learning development.

Getting Started tutorials

    • Official documents

The first step is to learn basic grammar and command operations. The official Go document is the first choice. However, due to well-known reasons, the official website cannot be accessed. You can access the godoc.golangtc.com mirror site view. or download and install the Go language to execute godoc commands:

godoc -http=:6060

Visit http://localhost:6060 the built-in website to view the mirror site. In addition, the godoc GOPATH source code generated in the automatic analysis of the document, can be viewed directly in the site access /pkg .

    • Video Tutorials

Recommended "Go Programming Basics" without a sniff. No-smell video tutorial simple and direct introduction to the basic syntax of Go command operation, a simple introduction to the use of some standard library methods. Learn basic grammar and operation is necessary to get started, slightest half a perfunctory . When you actually develop your practice, you'll learn more about the standard libraries and third-party library details you use.

If you are a WEB developer, after reading the basics of Go programming, you can learn the basics of Go web without a sniff. In the development of the blog program for example, the Go language development of the WEB process has a more detailed description. However, because it is already a relatively early video, it is possible that the class library used has already undergone a large version update and needs to be revised according to the relevant documentation practices of the Library class.

    • Books

The Go Language development book is the programing of the go, which is currently available in English only, and the Chinese version has not yet been published. Chinese people have a private translation version to search for . This book provides a very detailed introduction to the basic grammar of the Go language, the use of details, and code attention, is a very good introductory book. Examples and explanations of implementation details deserve to be read and understood over and over again.

The "Go Language Program" and "Go Web programming" are more recommended in Chinese books.

"Go language Programming" more involved in the use of the standard library, more suitable as a query standard library use method of manual. And because the standard library is the encapsulation of various operations, you need to have a certain understanding of the corresponding operation to be better familiar with the proper use of the API. This book is not suitable for introductory study.

"Go Web Programming" is an open source book written by Astaxie, mainly related to the technical content of go in the WEB domain development.

More in-depth books can see it's "Go Concurrency Programming" and rain marks of "Go 1.5 source analysis."

Go concurrency programming uses detailed, verbose text to illustrate how go works in concurrent programming and the issues that need to be faced. Developers with experience in concurrent program development can read this book in Leaps and bounds. If the relevant experience is lack, can be more in-depth understanding of the text content. In addition, this book is divided into the Go Language Foundation and the concurrent programming two parts. Beginners can learn the go language from the beginning to be able to develop concurrent programs.

"Go 1.5 source code analysis," The comparison of the implementation of the simple Go source code. If you are interested in the Goroutine Scheduler, memory model, and Channel and lock implementations, you can go deep into the book. And already familiar with go developers can also read this book, deepen the understanding of many details of go, efficient use of the relevant operations of go, targeted analysis of the use of the go process problems encountered.

Development tools

Go officially does not develop specialized development tools, but provides tools such as gofmt,golint,gopkgs,go-oracle for Code analysis and indexing of go. Third-party developers also develop assistive tools such as Gocode,goimports,godef,gometalinter.

Atom and Visual Studio Code

Atom and Visual Studio Code are Web-implemented text browsers developed based on the Electron browser kernel. These two are my main development tools at the moment. Atomcommunity prosperity, many plug-ins, but also because of community development, the quality of the modules are uneven, inefficient operation. After installing a certain number of plugins, the overall operation of the editor becomes noticeably slower. AtomThe Go development plugin is go-plus. The specific configuration process can refer to the article supercharging the Atom Editor for Go development and to build the Golang atom IDE.

VS Code is Microsoft-led development, relatively Atom more efficient, but less open than Atom, plug-ins are not rich. The VS Code installs the Go plugin to develop the go language. The configuration process can refer to articles using Visual Studio code to develop go programs.

Both plugins rely on the accessibility tools above to parse the Go language code. Therefore, installing the plug-in will also require the installation of assistive tools. The go-plus required tools are automatically downloaded during Atom installation and need to be VS Code installed on your own. Specific installation and configuration, refer to official website documentation, and web articles.

go get -u -v github.com/nsf/gocodego get -u -v github.com/rogpeppe/godefgo get -u -v github.com/golang/lint/golintgo get -u -v github.com/lukehoban/go-outlinego get -u -v sourcegraph.com/sqs/goreturnsgo get -u -v golang.org/x/tools/cmd/gorenamego get -u -v github.com/tpng/gopkgsgo get -u -v github.com/newhook/go-symbolsgo get -u -v golang.org/x/tools/cmd/guru

Sublime and Vim

Sublime 3 develops the Go language by installing the plugin gosublime. This tool is also dependent gocode and so on.

许多工具使用 godef 和 gocode 来检索 Go 代码。有时会无法提示最新代码内容。推荐此时 go install 对应的库。因为 godef 和 gocode 其实在检索 $GOPATH/pkg 中的预编译 .a 文件.

Vim is also a common development tool for developers. But because the operation and configuration is slightly complex, it takes a while to toss it to the easy. Use Vundle to install the Vim-go plugin directly for Go language development. In order to match the ctags, you also need to install the gotags tool:

go get -u -v github.com/jstemmer/gotags

Liteide

Liteide is a cross-platform lightweight integrated development environment (IDE) designed for Go language development, based on QT development and supports Windows, Linux, and Mac OS x platforms. In addition to the regular encoding features, there are some features:

    • Supports cross-compilation based on current system switchover and configuration liteide currently used environment variables
    • class Browser and outline display

Intellij Idea and Goclipse

Intellij idea is a very powerful IDE integrated development tool that supports a variety of mainstream languages. Third-party developers have developed the Go plugin to let idea support the development of the go language. This plugin has very strong code analysis capabilities and does not require the use of third-party development tools. And relying on the idea SDK powerful features, code hints, refactoring and debugging functions are very good. It's not as comfortable as idea's own tools, but it's a lot more powerful than any of these tools. Note that the Go plugin has more requirements for the version of Idea itself, please download to determine the appropriate version.

Goclipse is the Go development tool under the ECLIPSE system. At that time, he had developed slowly, so he did not have a deep experience. Recently developed again, the children's shoes are used to experience Eclipse.

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.