Answer the question
In order to leave comments, you need to log in
What is the role of packages in Go?
I searched for a very long time, but I did not understand a clear, and most importantly, understandable explanation of why packages are in Go, what is it, what is their role? Can you please explain? Preferably as easy as possible :)
Answer the question
In order to leave comments, you need to log in
This can be thought of as an analogy with other languages:
Classes
Namespace
The point is the same, to group the code that performs one task and separate it from the rest of the code for ease of maintenance.
For example, the net/http package allows you to work with the http protocol. encode/json, with json format, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question