Packages And Modules - Golang - Complete Documentation by ntxm.org

Packages in Go

How Go packages map to folders, how exported names work, and how the internal directory restricts imports.

Go Project Layout

How to structure a Go project as it grows, from a single main.go to internal packages and cmd folders for multiple binaries.

Go Modules

Understand go.mod and go.sum, add and tidy dependencies, work with versions and major version paths, and use replace.

Working Across Go Modules

Develop several local modules together with go.work workspaces and fetch private modules with GOPRIVATE and git credentials.