Essential Go  Suggest an edit

Packages

A package in Go represents a unit of related code.

In other languages packages are called libraries.

A package consists of multiple files but they all have to be in the same directory.

Larger libraries can split into multiple sub-packages.

Go standard library is provided as a set of packages.

A package is identified by import path e.g. github.com/gomarkdown/markdown is an import path of a package that parses markdown format.

  ↑ ↓ to navigate     ↵ to select     Esc to close