From time to time, someone asks me some questions about the Go language learning route and learning resources. This article will elaborate on it. Hope to give those who are learning, or want to learn Go language friends some help.

To be clear, it should not be a problem to learn as I recommend, fully master the knowledge of Go development, and find a job in Go development. Of course, the specific degree can be achieved depends on the individual.

To clarify, all the books mentioned in the article can be obtained by responding to the corresponding keywords: [Algorithm, operating system, network, database, Go, micro-service] in the background of the official number [Roseduan], as needed.

1. Basic knowledge

No matter what programming language you are learning, these basics are universal and important, so I thought I’d better take them out and talk about them. But now there is a lot of knowledge about this on the Internet. If you search zhihu and official accounts, you can find a lot of relevant content.

1.1 Data structure and algorithm

Recommended introductory books “Big Talk data Structure”, “Aha! Algorithm”, “Cartoon Algorithm · Xiao Gray’s Algorithm Journey”, “Algorithm Diagram”, if advanced, you can see “Introduction to Algorithm”, “Algorithm”.

If you find books boring, there are paid columns online that you can subscribe to. Note that if it is not an algorithm direction, it is ok to master the most basic common content, there is no need to succumb to too many advanced data structures and algorithms.

To consolidate the algorithm knowledge, you can brush a few problems on Leetcode. Of course, this content also has a function, that is to cope with the interview, everyone knows. I have a project on Github that can help you learn and consolidate algorithms. Address:

Github.com/roseduan/al…

The project uses Go, Java and Python to implement common data structures and algorithms, as well as related Leetcode topics.

1.2 Operating System

This is just a quick look at the basic concepts. You probably won’t need much operating system knowledge in the first few years of your career, but trust me, it’s a hurdle you’ll have to deal with sooner or later.

Recommended learning resources: Operating System Concepts, In-depth Understanding of Computer Systems, modern Operating Systems.If you can’t read books, I can understand you (because I can’t read books either). Here is a recommended course on operating system:

www.xuetangx.com/course/THU0…

Is an open course of Tsinghua University, the concept is more basic and easy to understand, if you want to go further, people also have a supporting operating system experiment can follow.

1.3 Computer Network

Basic books: Illustrated HTTP, Illustrated TCP_IP, How Networks Are Connected.

Advanced books: Computer Networks, top-down approach, TCP_IP in detail.

Similarly, I know you can’t stand reading books. There are some open online courses offered by famous universities on Chinese university MOOCs, which are relatively basic. You can look for them.

1.4 database

The importance of database goes without saying, the necessary knowledge.

Basic SQL master should not what difficulty, their practice on the line, recommended books “SQL will know will”, “MySQL will know will”.

If you want to learn more about basic database design concepts, you can read the recommended books Database System Concepts. For advanced mysql, such as B+ tree storage model, transactions, indexes, and locks, you can read the recommended books High-performance mysql and Inside mysql Technology: InnoDB Storage Engine.

2. Go language foundation

Finally came to the topic of Go language, if you are Go language zero foundation, or just a new entry, you can follow my path to learn to consolidate.

Recommended introductory books “Go Language Learning Notes”, “Go Language Fun Learning Guide”, “Head First Go”, follow the books to knock on the code, there is no big problem to get started.Here are some of my personal resources for learning Go online:

  • Go By Example Chinese version: gobyexample.cn. Github. IO, use code examples to learn Go language.
  • Go for an interview: www.topgoer.cn/docs/gomian… Go is also a good way to prepare for an interview.
  • No Smell big guy’s online starter guide: github.com/unknwon/the…
  • Learn with unit tests Go: github.com/quii/learn-…

After learning the basics, you know you might want to give it a try. Here are a few beginner programs, so just pick one or two that interest you.

  • Starcharts:github.com/caarlos0/st… , the function of the project is to generate the star trend chart of the project on Github, the core code is not much, it is very suitable for practice.
  • Gorched:github.com/zladovan/go… , using Go to write a small game.
  • Pacgo:github.com/danicat/pac… , is also written using Go a small game, each step has a detailed description and code implementation.
  • Wechat-go:github.com/songtianyi/… , the Go implementation of wechat Web VERSION API, simulating the login/contact/message sending and receiving functions of wechat web version.

3. Go language advanced

After mastering the basic grammar knowledge related to Go, you may need to have a deeper understanding of Go language. For beginners, you can choose the parts you are interested in, because it is impossible to understand them all at once.

Note that this content is relatively independent, can be viewed at any time, will not prevent you from learning the following content.

Recommended books are Go Programming Language (the Go Bible), Go Expert Programming, and Advanced Programming for the Go Language.Online learning materials:

  • Go Language Design and Implementation: DraP P. Me/Golang.
  • Advanced Programming for Go: chai2010.cn/advanced-go… .

To further consolidate your knowledge, here are some more advanced projects:

  • Rosedb:github.com/roseduan/ro… I shamelessly recommend my own project, a simple and efficient K-V storage engine implemented with Go.

  • Gochat:github.com/LockGit/goc… , a Go language to achieve lightweight IM system, familiar with the network or interested can see.

  • 7 daysgolang:github.com/geektutu/7d… 7 days to use Go from zero to achieve the Web framework, distributed cache, ORM framework, RPC framework, code is not much, but the quality is quite good.

5. Web development

After mastering the basic knowledge, I can get started to do some Web applications, further understand more Go language related frameworks and common middleware in production environment.

The recommended book is Go Web Programming.You can learn Gin and Beego: both frameworks are popular, so you can choose one of them. Gin is recommended. The official document is in Chinese, according to the demo, to understand how to handle HTTP requests.

It is best to master the more popular ORM framework Gorm, there is an official Chinese document, according to the demo knock basically two days can master, after encounter will not check again.

Basically, you can just read official documents. There is no need to find other books. There is no more authentic material than official articles.

A few basic Web projects built using Go are recommended:

  • Gin-vue-admin:github.com/flipped-aur… , using Gin framework to build a background management system.
  • Ferry:github.com/lanyulei/fe… , based on Gin + Vue + Element UI front and back end separation of work order system.
  • Go-admin:github.com/go-admin-te… Gin + Vue + Element UI front and back separated permission management system.

For the study of web projects, some students may feel that the project is too complex, do not know how to start. What I would suggest is that you can run the project locally, then break through the entire flow of an HTTP request, understand an interface, and much the same.

6. The service

At present, Go is widely used in microservices, but to be honest, microservices is a huge topic, you can not understand every core problem, and there is no condition, maybe only in the company’s specific microservices production environment, can you have a deeper understanding of the related concepts.

Recommended basic books microservices overview microservices Design and Microservices Architecture Design Patterns to help you understand the basics of modeling, integration, testing, deployment, and monitoring microservices.Recommend GoKit, GoMicro, Go-Zero, kratos as microservice frameworks for the Go language. Choose any of them and understand their basic usage, design, etc. Among them, Go-Zero and Kratos are domestic open source, so both have relatively detailed Chinese documents.

Here is a recommended online learning material:

Ewanvalentine. IO/microservic…

You can learn about microservices through this simple Go microservices project, and there is a Chinese version.


Finally, I would like to remind you that all the books mentioned in the article can be obtained by responding to the corresponding keywords: [Algorithm, operating system, network, database, Go, micro-service] in the background of the official number [Roseduan], and they can be obtained by themselves on demand.