Documentation
¶
Overview ¶
Package module owns Go module identity and source discovery.
Index ¶
- func ImportPathLocal(root, modulePath, directory string) (string, error)
- func ParsePath(name string, content []byte) (string, error)
- type BuildError
- type BuildModule
- type BuildPackage
- type BuildSelection
- type BuildWorkspace
- type File
- type Info
- type LocalDiscovery
- type LocalWorkspace
- type PackageLocation
- type Workspace
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportPathLocal ¶
Types ¶
type BuildError ¶
type BuildError struct{ Err string }
type BuildModule ¶
type BuildPackage ¶
type BuildPackage struct {
Dir, ImportPath, Name string
GoFiles, CgoFiles []string
DepOnly, Standard bool
Module *BuildModule
Error *BuildError
DepsErrors []BuildError
}
type BuildSelection ¶
type BuildSelection struct{ Packages []BuildPackage }
BuildSelection is a serializable snapshot of Go's source selection. Paths remain source-backed; it is not a relocatable deployment bundle.
func (*BuildSelection) Workspace ¶
func (s *BuildSelection) Workspace() *Workspace
type BuildWorkspace ¶
type BuildWorkspace struct {
BaseDir string
Patterns []string
Tags string
Env []string
Overlay string
}
BuildWorkspace delegates module, workspace and target selection to the Go command. Env is a complete command environment; nil inherits the caller's environment. Patterns use Go's package syntax. No command in this owner executes application code.
func (BuildWorkspace) Resolve ¶
func (b BuildWorkspace) Resolve(ctx context.Context) (*BuildSelection, error)
type Info ¶
func LocateLocal ¶
LocateLocal accepts an existing file/directory or a not-yet-created package directory and finds its nearest enclosing module without changing disk state.
type LocalDiscovery ¶
type LocalWorkspace ¶
LocalWorkspace resolves explicitly available local source modules. It never downloads modules or treats imported dependency packages as selected roots.
type PackageLocation ¶
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
func (*Workspace) Package ¶
func (w *Workspace) Package(importPath string) (*PackageLocation, error)
Package resolves roots and applicable local replacements lazily. Missing unused developer replacements cannot invalidate unrelated selected packages.