Go Learning Route (2022)

Go language development is getting better and better, many large factories use Go as the main development language, there are also a lot of people began to learn Go, ready to turn to Go development.

So, how do you learn?

I find that in the Internet age, the difficulty of learning is not that there is no material, but that there is too much material to know which one to look at and where to start.

Therefore, I compiled a list of Go learning routes, which do not win by quantity and strive to be concise. From basic to advanced, from theory to practice, it includes the following contents:

  • Introductory tutorial
  • Advanced tutorial
  • Books recommended
  • Web development
  • Try their project
  • utility
  • Technical community

The course will continue to be updated, and those who are interested can bookmark this link: github.com/yongxinz/go… To get the latest resources as soon as possible. It would be really appreciated if you could give me a STAR.

Introductory tutorial

Go Language Chinese – Go language tutorial

Link: c.biancheng.net/golang/

This Go language tutorial is easy to understand and easy to understand. It is suitable for readers who have no basic knowledge to get started quickly, but also for programmers who have worked for many years to consult knowledge points.

Rookie tutorial – Go language tutorial

Link: www.runoob.com/go/go-tutor…

This site doesn’t need much introduction. Many introductory tutorials for programming languages can be found here. In the process of writing code at ordinary times, a knowledge point forgotten, you can also check here.

W3cshcool-go tutorial

Link: www.w3cschool.cn/go/

Is also a comprehensive programming tutorial site, a lot of information, but also very basic.

Go by Example

Link: gobyexample.com/

Lots of code examples, useful for learning the basics. You can read the theory, while referring to the site to write code, the effect will be better.

Ground squirrels document

Link: www.topgoer.cn/

Can be said to be Go programming navigation website, collection of a lot of Go learning materials. Including websites, books, open source libraries, open source projects, etc.

Advanced tutorial

Mojotv blog

Link: mojotv.cn/

Very good blog, there are many Go advanced articles, as well as other aspects of the technical articles, worth reading. I tried to find the author’s information, but couldn’t find it.

Fish Fry – Go language design philosophy

Link: golang3.eddycjy.com/

The blog of The Fried Fish Guy, combined with official materials and the author’s own understanding, sorted out a series of articles on the concepts and philosophies related to Go language design.

Faith-oriented programming – Go language design and implementation

Drap. Me /golang/

Left god’s blog, the content is very deep, want to become a great god, absolutely must read.

Go night

Website link: talkgo.org/

This is an open source project organized by a number of senior Gopher organizations to interpret the Go source code. And I’m open source, uploading all the relevant resources to GitHub.

Books recommended

The book contains 10 books, divided into 5 introductory books and 5 advanced books. I have read seven of them, and the other three are recommended online although I have not.

There are both introductory and advanced sections, but many books cover both. You can look at the time according to their own situation, first lay a good foundation, and then advanced.

Some of the books are open source and can be read online, while others are available as e-books, which can be downloaded on GitHub. If conditions permit, it is best to buy the legal version.

An introduction to

The Go Language Fun Guide

This book is a Go language for beginners of the book, the content is relatively shallow, very suitable for entry.

The book provides step-by-step instructions on what you need to know to use Go, lots of interesting examples, and lots of exercises to deepen your understanding.

Get Started with Go

The English title of The book is The Way to Go, and The author spent his spare time translating it. Made it open source under license from the original author Ivo Balbaert.

Read online: github.com/Unknwon/the…

Go Programming

This book mainly introduces the Go language features, and the examples try to use the author’s ordinary practice, rather than a grammar example without much practical significance. A horizontal comparison with C++ and Java makes the difference in design philosophy more intuitive.

The author Xu Shiwei is the former chief architect of Kingsoft WPS, a researcher of Shanda Innovation Institute, and currently a Go language expert recognized by the domestic Go language practice circle. Several authors involved in the writing of this book are actual Go language development project developers, have strong practical experience.

Go Language 101

Is a programming guide that covers Go syntax and semantics as well as runtime knowledge points (Go 1.17 ready). This book aims to help Go programmers understand the language as thoroughly as possible.

The book also collects many details of the Go language and Go programming, some of which are never mentioned in the official documentation.

This book is suitable for both Go beginners and experienced Go programmers.

Online reading: gfw.go101.org/article/101…

Go Programming

Written by Kernighan and Alan Donovan, head of Google’s Go team, the book is a how-to guide to learning the Go language. It’s informative and comprehensive, covering all the basics and worth a read.

The advanced

Go Language Practice

This book is thin compared to other technical books. Obviously, this is not a comprehensive, all-encompassing book, but it gets to the point.

In my reading process, the biggest feeling is that many of the basic knowledge encountered in the process, and it is difficult to find answers through search engines, here obtained the answer.

Go Web Programming

Learning a language is not the goal. Being able to use the language to do work and earn money is the goal. Therefore, I have to learn the application of Go in Web programming.

This book was translated by Huang Jianhong, the author of Redis Design and Implementation, which provides an excellent analysis of the data structures and design ideas used in Redis.

Advanced Programming in Go

Covers advanced topics such as CGO, Go assembly, RPC implementation, Web frameworks, distributed systems, etc. There is no strong correlation between the chapters in the book. Each chapter is independent knowledge and can be read on demand.

Read online: github.com/chai2010/ad…

Notes on Language Learning in Go

The writer is a rainmark mogul and lecturer at the first GopherChina Conference in 2015.

The book is divided into two volumes:

The first volume is a detailed analysis of the details of the language specification, so as to facilitate readers’ in-depth understanding of the use of language-related functions and matters needing attention.

The next volume provides an in-depth look at the runtime source code, leading the reader to a thorough understanding of the supporting environment and operating system behind language features such as memory allocation, garbage collection, and concurrent scheduling. This book is not intended for beginners in programming, but for those who have practical programming experience or are working with Go.

Anatomy of the Basic Principles of Go language

This book uses easy to understand language and a large number of pictures to deeply introduce the Go language compilation time, type system, syntax features, function call specifications, concurrent programming, memory management and garbage collection, running state monitoring and other modules of the use of the method and the underlying principles.

For those who want to understand the underlying principle of Go and read the source code, you can read this book, but it is not an easy thing to fully understand the content of the book.

Web development

Go is an open source programming language that makes it easy to build simple, reliable and efficient software. Because of its simplicity, reliability, and efficiency, Go has the following advantages when developing Web applications:

  1. More simple
  2. Better compilation capability
  3. Higher performance
  4. Good IDE support and debugging capabilities
  5. Syntax is simple and easy to use

Here are five open source Web frameworks that were selected based on: being popular on GitHub, being actively maintained, being used, and being easy to find.

Gin

Project address: github.com/gin-gonic/g…

An HTTP Web framework written entirely in Go provides a faster and higher performance Go Web development framework.

This framework is easy for beginners to learn, and star is the most popular and widely used Web framework.

Beego

Project address: github.com/beego/beego

Beego is a Go language development expert Asta Xie developed a simple and easy to use enterprise Go application development framework, with the full Chinese official website and tutorials.

Different from other framework languages, Beego not only provides graphic tutorials, but also provides video tutorials, which is very friendly to domestic developers.

Iris

Project address: github.com/kataras/iri…

The Iris framework is described on its official website as the fastest Web framework in Go development, and gives a performance comparison between multiple frameworks and multiple languages.

If you are looking for a high-performance, lightweight and easy-to-use Web development framework for the Go language, Iris is a good choice.

Echo

Project address: github.com/labstack/ec…

Echo is a fast HTTP router (zero dynamic memory allocation) and a miniature Web framework for Go.

It has a fast HTTP router, supports extended middleware, supports static file services, Websockets, and supports binding functions, rendering functions, and allows the use of arbitrary HTML template engines.

GoFrame

Project address: github.com/gogf/gf

GoFrame is a modular, high-performance, enterprise-level Go infrastructure development framework. GoFrame is not a WEB/RPC framework, but a general-purpose base development framework that is an enhanced extension of the Golang standard library and contains common core base development components.

The advantages are actual combat, modular, comprehensive documentation, module rich, easy to use, strong versatility, team oriented.

In general, this project has a perfect Chinese document, a surrounding development library, an active issue discussion area and a good modular design.

Each of these 5 open source projects has its own advantages and disadvantages. Some of them have been tested and widely used in the market. Some as up-and-comers, rapid development.

You can choose what you are interested in to learn and use.

Try their project

After learning the theory, the next step is the actual practice and start to do projects. In addition to Web development, there are many directions to choose from, such as DB, cache, IM, and so on. Moreover, as a training project, it should not be too complicated, otherwise it will be difficult to understand, but will hurt confidence and fail to exercise.

Here I chose 5 projects. Overall, the amount of code is not very large and the difficulty is moderate. And different projects can learn different technical points, people can choose their own interest to try.

id-maker

Project address: github.com/yongxinz/id…

Go development of a distributed unique ID generation system.

Small amount of code, the overall difficulty of the project is small, through this project can learn to httpServer, gRPC related knowledge.

cache2go

Project address: github.com/muesli/cach…

A relatively simple cache library, the amount of code is very small, suitable for novice learning. Learn about locks, Goroutine, etc.

rosedb

Project address: github.com/flower-corp…

Rosedb is a stable, high-performance, fast, embedded K-V storage engine that supports a variety of data structures, including String, List, Hash, Set, Sorted Set, and interface name style similar to Redis.

The project is implemented with pure Golang, and most of the basic knowledge of Go language is included. I believe it will be a very good project to learn and consolidate Golang.

In addition, the code also has some data structure implementation, so you can also learn about data structure knowledge.

wechat-go

Project address: github.com/songtianyi/…

This is the Go language implementation of wechat Web VERSION API, which simulates the login/contact/message sending and receiving functions of wechat Web version. It can completely take over the messages received by wechat and customize its own sending content.

I think this project is quite interesting. If you use wechat to operate it, you can feel more fun of learning.

gin-vue-admin

Project address: github.com/flipped-aur…

Gin – VUE-Admin is a full-stack background management system that uses GIN + VUE for rapid development. Gin framework is used in the background and VUE is used in the front end.

The directory structure of the project is very clear, and the package name is semantic, which helps you get started quickly.

The project also uses some popular Go open source libraries and middleware, such as:

  • Gin: The most popular Go language Web framework
  • Gorm: Database operation middleware
  • Zap: Uber’s open source Go language log library
  • Redis: k-V cache

In addition, the project has detailed Chinese documents and accompanying teaching videos, which are worth learning.

utility

As editors have become more powerful, there are some small and beautiful sites that have been replaced by editors, but I still like them, and I recommend them below.

JSON to Go struct

Mholt.github. IO /json-to-go/

YAML to Go struct

Link: zhwt.github. IO /yaml-to-go/

Table to Go struct

Link: github.com/gohouse/con…

There are two ways to use the command line call and write Go code. Neither approach is complicated, as described in this article: Three useful Go development tools are recommended

Rego

Link: regoio.herokuapp.com/

Go language regular online test.

plantUML

Link: www.dumels.com/

This site analyzes a Go project and generates UML diagrams of interfaces and constructs. Once you have this diagram, you basically have a basic idea of the overall relationship of the project, and it’s relatively easy to read the source code again.

See this article for details: Read the Go source code and try out the tool

Playground

Go.dev /play/

The Go language code runs online.

Technical community

Now, the tech community is probably less watched and less active. From my personal experience, this is also the case, what questions directly Google, the basic will not go to the technical community to check to ask.

Here recommend a few I feel good, leisure time can look around.

  • Go website
  • Go official mail discussion group
  • Go Language Chinese
  • Go Forum
  • Golang China

In addition, two other sites that are important are GitHub and StackOverflow. Conservatively, these two sites support half of a programmer’s salary.

That’s all for this article. I hope you have a good time.

All the resources mentioned in this article, including e-books, brain maps, etc., will be open source on GitHub. In addition, this learning route will be constantly maintained and updated, you can also follow my GitHub, so that you can get the latest resources in the first time.

If you think this article is ok, please like it, share it and thank you for your support.


Open source address:

  • Github.com/yongxinz/go…