package workspace
Import Path
go.pact.im/x/goship/internal/workspace (on go.dev)
Dependency Relation
imports 12 packages, and imported by 3 packages
Involved Source Files
Package workspace loads Go modules from a VCS repository revision via
go.work files or VCS tree walks.
Package-Level Type Names (total 5, all are exported)
AutoLoader uses WorkLoader when a work file exists at the target revision and
falls back to WalkLoader otherwise.
WorkFile string
Load delegates to WorkLoader if a go.work file is present, else WalkLoader.
Name returns "auto".
*AutoLoader : Loader
Loader loads Go modules at a given VCS revision.
( Loader) Load(ctx context.Context, v vcs.VCS, rev string) ([]*modgraph.Module, error)
( Loader) Name() string
*AutoLoader
*WalkLoader
*WorkLoader
func New(mode Mode, workFile string) (Loader, error)
Mode selects how Go modules are loaded from a repository.
func go.pact.im/x/goship/internal/config.WorkspaceConfig.Mode() Mode
func New(mode Mode, workFile string) (Loader, error)
const ModeAuto
const ModeWalk
const ModeWork
WalkLoader loads all tracked go.mod files in the VCS tree at rev.
Load lists tracked files at rev and parses every non-ignored go.mod file.
Name returns "walk".
*WalkLoader : Loader
Package-Level Functions (total 5, in which 1 is exported)
New returns a Loader for mode (ModeAuto, ModeWork, or ModeWalk).
If workFile is non-empty, ModeWork and ModeAuto read that repo-relative work
file instead of DefaultWorkFile.
Package-Level Constants (total 4, all are exported)
DefaultWorkFile is the default Go workspace filename.
ModeAuto uses ModeWork when a go.work file exists and falls back to ModeWalk.
ModeWalk loads all tracked go.mod files in the VCS tree.
ModeWork loads modules listed in a go.work file.
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64)