Where is the best place to start learning Golang?

@bep @tjholowaychuk @moorereason @spf13 @digitalcraftsman

I think I’ll only be able to contribute so much with this project if I don’t start taking learning golang seriously. Keeping in mind that I do not program full time, I’m looking for a really good starting resource to hit the ground running. I’m a reasonably quick study, and I can Google this like crazy, but I’d rather get some advice directly from seasoned development pros. Cheers.

This is a good source:

I like this https://gobyexample.com/

Short and to the point.

I would say that, once you get passed the fundamentals, I would start “doing it”. Start creating Pull Requests on a open source repo – nothing is more motivating than to see something that you made getting used by many, and the open source community/PR structure is a great place to get “free code reviews” from seasoned pros.

2 Likes

Thanks for the advice @bep. It will take time before I’m decent, but I’d like to improve the TOC feature unless you think that falls into the “advanced” category. Cheers.

The ToC feature fall into “must be fixed outside of Hugo”.

I’m no developer pro (I’m a SysAdmin), but I started with https://tour.golang.org/. Once the pseudocode in your head defaults to Go, I’d recommend reading the actual Go spec. It sounds daunting, but it’s concise and readable for a whole programming language.

I don’t want to discourage you from learning Go, but Hugo is a complex place to start (particularly the hugolib package, which happens to be the most critical piece to understand!).

If you learn enough to be able to read Go, it may be enough to help troubleshoot and write better docs. If you want to get your feet wet, find a bug to tackle. You’ll learn a ton just trying to figure out how the existing code works.

PS - The ToC features definitely fall into the Advanced category. Another one people think should be easy is frontmatter sorting behavior – also solidly in the Advanced category.

2 Likes

Awesome. Thanks for the feedback, @moorereason!

Just wondering, is this desire to learn Go primarily for working on the TOC, or also related to your Hugo documentation revamp project?

(I’m asking because I also thought about learning Go in order to write insightful Hugo content.)