What are the benefits of using 'Workspaces' (go.work) in a multi-module project?
Last updated
A
go.workfile (Go 1.18+) lets several local modules be developed together. Changes in one module are seen immediately by others.It replaces the old habit of adding
replacedirectives togo.mod. It lives outside the modules and is usually not committed, keepinggo.modclean.The
usedirective lists participating modules. Create it withgo work initand add modules withgo work use.