March 2020
Intermediate to advanced
406 pages
8h 39m
English
Many Go programs use the concept of an internal package in order to signify an API that is not ready for external consumption. The idea of internal packages was first introduced in Go 1.4, to add boundaries around components within your program. These internal packages cannot be imported from outside the subtree in which they are stored. This is useful if you want to maintain your internal packages and not expose them to the rest of the program. Once you've vetted internal packages in the manner you deem fit, you can change the folder name and expose the previously internal package.
Let's see an example:

In the preceding ...
Read now
Unlock full access