Versions in this module Expand all Collapse all v0 v0.36.4 Aug 21, 2026 Changes in this version + const ListError + const ParseError + const TypeError + var ErrImportCycle = errors.New("import cycle") + var ErrStrategyUnavailable = errors.New("loading strategy unavailable in this build") + type Config = packages.Config + type Error = packages.Error + type ExportOnly struct + Path string + Reason string + type GoEnv struct + GOARCH string + GOEXPERIMENT string + GOFLAGS string + GOOS string + GOWORK string + type LoadMode = packages.LoadMode + type Loader struct + func NewLoader(opts ...Option) *Loader + func (l *Loader) Load(cfg *Config, patterns ...string) ([]*Package, error) + func (l *Loader) ReadBackSource(pkg *Package) bool + func (l *Loader) Strategy() Strategy + type Option func(*options) + func WithCompiledDependencies() Option + func WithExportData(fsys fs.FS) Option + func WithFS(fsys fs.FS) Option + func WithGoEnv(env GoEnv) Option + func WithOnExportOnly(fn func(ExportOnly)) Option + func WithOnSynthesized(fn func(Synthesized)) Option + func WithStrategy(s Strategy) Option + func WithStubbedStdlib() Option + type Package = packages.Package + type Strategy int + const StrategyGoPackages + const StrategyToolchainFree + func (s Strategy) String() string + type Synthesized struct + Cgo bool + Deliberate bool + Path string + Pos token.Position