Recommended ways to learn the standard library?

My question is pretty simple, what are your recommendations for learning the standard library? I am thinking mainly of free books and YouTube playlists, or free courses on the web.

But please do suggest books and courses that cost money IF they are really good, and worth the money.

I mean - the best way is to learn the standard library by using the parts of it you need when you need them. The go stdlib is pretty broad/capable (like will you need to use crypto, image, and math right away? Probably not). Start here and see what appeals to you:

I am pretty partial to The Go Programming Language if you want a good book. You can read the first chapter free:

https://www.gopl.io/

A tour of go is also excellent for newcomers:

https://go.dev/tour/welcome/1

And of course Go By Example:

https://gobyexample.com/

My advice for newcomers is always: build something you want to use. It’s similar to how, when you’re learning an instrument, practicing scales and whatnot can be boring but if you teach somebody how to play a song they like from the radio they will be way more likely to practice. Build something that you want to use!

1 Like

I am not a newcomer to Go, I have been using it for three-four years now, and I still feel like I don’t know half of the standard library. What I need is more a guide to what functionality do exist in the library. Sort of a walk trough of the standard library, not the language.

This book does not seem to cover the standard library. I will check out Go by example though, it seems to cover at least part of it.

Thanx…

If you’re not a newcomer to Go, you should be able to just read the godoc and grok it:

https://pkg.go.dev/std

You could also spelunk through the source code:

https://cs.opensource.google/go/go/+/master:src/

Well, I don’t want to :slight_smile:

I want somebody who knows a lot about the standard library to give me examples of how to use it. And reading the source code does not give me information about how and when to use the functions and interfaces etc.

I guess I’ll just have to continue to suck at the standard library…maybe one day I will get the energy to read through GoDoc on my own, but I was hoping that somebody had created a guide through it…

Begin by understanding the core functionalities of the library, like fundamental data structures, control flow mechanisms, and input/output operations. Focus on mastering basic usage before diving into advanced topics.

Cool, give me some time maybe I will write this kind of book, I have 4 years of Go experience as well.
But not sure how many experience Gophers will need this kind of book.

The best way to solidify your understanding is by hands-on experience. Write code that utilizes various modules and functions from the library. Start with simple projects and gradually increase complexity.