Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempModfileBuildFlags ¶
TempModfileBuildFlags returns go command flags that allow module graph updates without mutating the project's go.mod/go.sum.
This is primarily to make packages.Load work reliably even when the project module isn't tidy (for example, a freshly scaffolded module that only requires a local replace).
It returns flags suitable for packages.Config.BuildFlags:
- -mod=mod
- -modfile=<temp file>
Call cleanup after packages.Load completes.
Types ¶
type CompatibilityError ¶ added in v0.1.0
type CompatibilityError struct {
RequiredVersion string
RequiredBy string
EffectiveVersion string
GOTOOLCHAIN string
}
CompatibilityError reports a mismatched effective Go version.
func (*CompatibilityError) Error ¶ added in v0.1.0
func (e *CompatibilityError) Error() string
type Environment ¶ added in v0.1.0
type Environment struct {
GOVERSION string
GOROOT string
GOTOOLCHAIN string
GOPROXY string
GOSUMDB string
GOCACHE string
GOMODCACHE string
GOPATH string
GOMOD string
GOWORK string
}
Environment captures relevant `go env` values.
type Report ¶ added in v0.1.0
type Report struct {
ProjectDir string
GoModPath string
LauncherPath string
GoBinaryPath string
Requirements Requirements
Environment Environment
RequiredBy string
RequiredGoSem string
}
Report describes the effective Go toolchain for a project.
type Requirements ¶ added in v0.1.0
Requirements captures version requirements declared in go.mod.
Click to show internal directories.
Click to hide internal directories.