-
Book Overview & Buying
-
Table Of Contents
Practical Systems Programming in Go
By :
In Go, Workspaces provide a way to manage multiple modules and projects in a single development environment, enabling seamless code sharing and dependency management. Technically, a workspace is defined via a go.work file, which lists the directories containing modules that you want to include in the workspace. This allows the Go toolchain to resolve module paths locally rather than always fetching dependencies from remote repositories, which is particularly useful when working on several interdependent modules simultaneously. The go.work file supports directives such as use for including module directories and replace for overriding module versions or paths. When you run commands such as go build, go test, or go run inside a workspace, tools automatically consider all modules listed in the workspace, allowing imports across these modules without requiring them to be published. Workspaces thus improve developer productivity, support complex multi-module projects, and simplify...