Packages
The first statement in any go file is a package declaration., followed by import, then package level members such as variables, constants and functions:
Go supports two levels of visibility, package and public, if the the first letter of a thing is a capital it means it has public visibility. Lowercase naming implies private visibility.
There are two levels of viability:
- package
- public
For example, importing the following user package the ID and Username can be seen but the password would remain private within the package.
Example: