Go
Workspaces Commands
Work with multiple Go modules simultaneously using workspaces. Develop interdependent modules locally without publishing, perfect for monorepos and multi-module projects.
5 commands
Pro Tips
Use 'go work init ./module1 ./module2' to create a workspace from existing modules.
Add a module with 'go work use ./new-module' — changes reflect immediately across all workspace modules.
Use 'go work sync' to sync dependency versions across all workspace modules.
Common Mistakes
Don't commit go.work to the repository unless everyone uses the same workspace layout. Use go.work.sum instead.
Workspace mode overrides replace directives in individual go.mod files. This can cause confusion.