Skip to content

core go work init

Initialize a Go workspace.

Wrapper around go work init. Creates a new go.work file in the current directory.

Usage

core go work init

What It Does

  • Creates a go.work file
  • Automatically adds current module if go.mod exists
  • Enables multi-module development

Examples

# Initialize workspace
core go work init

# Then add more modules
core go work use ./pkg/mymodule

Generated File

go 1.25

use .

See Also

  • use - Add module to workspace
  • sync - Sync workspace