A package in Go represents a unit of related code. Other languages often call them libraries.

A package consists of multiple files in a single directory. There's one-to-one mapping between a directory and a package.

You can have multiple packages in a single repository.

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.

Installing packages locally with go get

Importing packages

Creating a package

Package initialization

Package naming best practices