Go Packages

From NovaOrdis Knowledge Base
Revision as of 23:52, 6 September 2023 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

A Go package is a collection of variables and types, which include structs, interfaces, functions, etc.

Go modularization is build upon the concept of package. Packages provide a namespace for their names, and also the mechanisms to encapsulate code, hide implementation details and only expose features, such as variables, types or functions that are meant to be publicly consumed.

Packages as Namespaces

Packages as Encapsulation Mechanism