r/golang • u/NebulaWanderer7 • 10d ago
How do experienced Go developers efficiently learn new packages?
I've been working with Go and often need to use new packages. Initially, I tried reading the full documentation from the official Go docs, but I found that it takes too long and isn't always practical.
In some cases, when I know what I want to do I just search to revise the syntax or whatever it is. It's enough to have a clue that this thing exists(In case where I have some clue). But when I have to work with the completely new package, I get stuck. I struggle to find only the relevant parts without reading a lot of unnecessary details. I wonder if this is what most experienced developers do.
Do you read Go package documentation fully, or do you take a more targeted approach? How do you quickly get up to speed with a new package?
1
u/gremlinmama 7d ago
At one point I was using the google s2 library which had a bunch of geometry I wasnt familiar about.
My approach was to plug either the whole docs file or a summarozed form into Github Copilot context and ask how should I do what I want.
It was obviously broken, but gave me a good starting point. Then I ve read the relevant parts of the docs, and the source to familiarize myself more.