Go module
A Go module is a versioned collection of related Go packages defined by a go.mod file and managed as a unit for dependency resolution and builds.
Go in Action, Second Edition
A Go module is a versioned collection of Go packages described by a go.mod file and managed as a unit for dependency resolution and builds.
- How it is used
- Organizes Go packages into named units with managed dependencies for both single-project and independently evolving multimodule applications.
- How deep it goes
- Explains initialization, module files, dependency commands, and multimodule organization without detailing dependency resolution internals.
- Examples
- Uses a wordcount project and an RSS reader split into domain, storage, API, and worker modules.
- What you can do after
- Operate and configure Go modules with go mod init, go get, and go mod tidy.
Go in Practice, Second Edition
A Go module is a versioned collection of Go packages described by a go.mod file and its dependency requirements.
- How it is used
- Manages package dependencies as part of the Go toolchain.
- How deep it goes
- Explains the productivity and compile-time rationale, but does not detail go.mod syntax or version-selection internals.
- Examples
- Uses standard-library imports, an external URL import, and `go get ./...`.
- What you can do after
- Operate/configure dependencies with Go's integrated module tooling.
Read how Go in Practice, Second Edition explains go module →
Learn Go with Pocket-Sized Projects
A Go module is a versioned collection of Go packages defined by a go.mod file.
- How it is used
- Starts standalone Go applications, libraries, command-line tools, and HTTP services by establishing their project boundary.
- How deep it goes
- Explains initialization, go.mod creation, naming, and common layouts, but does not detail dependency versioning or module commands beyond setup.
- Examples
- Uses hello-world, bookworms, genericcache, an HTTP service, a maze solver, and a money-conversion CLI.
- What you can do after
- Build it from scratch by initializing a module, creating go.mod, choosing a module path, and organizing application or library files.
Read how Learn Go with Pocket-Sized Projects explains go module →
gRPC Microservices in Go
A Go module is a versioned unit of Go source code and dependency metadata managed as a cohesive module.
- How it is used
- Organizes each microservice and its generated gRPC code for dependency management across service boundaries.
- How deep it goes
- Explains initialization, module paths, version selection, repository tags, and separate test modules, without detailing Go dependency resolution internals.
- Examples
- Uses order, payment, and shipping modules, versioned generated clients, go.mod initialization, and a separate e2e module.
- What you can do after
- Apply it via go mod init and go get to create services, consume generated clients, pin versions, and isolate end-to-end tests.
Also covered in
- Go by Example
- Terraform in Depth: Infrastructure as Code with Terraform and OpenTofu
- 100 Go Mistakes and How to Avoid Them
What to know first
- GoGo is a statically typed, compiled, general-purpose programming language with garbage collection and built-in support for concurrency.
- packageA software package is a named unit that groups related software components, either for organization and compilation or for distribution and reuse.
Related concepts
- go.mod fileconfigured by · A go.mod file is a Go module manifest that declares the module path, Go language version, and required dependencies.
- go mod initconfigured by · go mod init is a Go command that initializes a module by creating its go.mod file with a specified module path.
- packagehas part · A software package is a named unit that groups related software components, either for organization and compilation or for distribution and reuse.
- Goused by · Go is a statically typed, compiled, general-purpose programming language with garbage collection and built-in support for concurrency.
- go getconfigured by · go get is a Go command that adds or updates module dependencies and their required versions in a module’s dependency metadata.
Questions about go module
What is go module?
A Go module is a versioned collection of related Go packages defined by a go.mod file and managed as a unit for dependency resolution and builds.
Which Manning books explain go module?
Go in Action, Second Edition, Go in Practice, Second Edition, Learn Go with Pocket-Sized Projects and gRPC Microservices in Go.
What should I know before learning go module?
Manning books that teach go module usually introduce Go and package first.
What are the parts of go module?
Go module includes package.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



