load

package
v1.1.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	AbsPath string
	Name    string
	Content []byte
	Error   error
	Syntax  *ast.File
}

type LoadOptions

type LoadOptions struct {
	Dir         string
	Overlay     overlay.Overlay
	Mod         string
	IncludeTest bool
	ModFile     string // -modfile flag
	Deps        bool   // -deps flag

	// max file size to parse
	// if file size is larger than this
	// see https://github.com/xhd2015/xgo/issues/303
	// for more background
	MaxFileSize int64

	Goroot string

	FilterErrorFile bool

	Fset *token.FileSet
}

type Package

type Package struct {
	GoPackage *goinfo.Package
	Files     []*File
}

type Packages

type Packages struct {
	Fset     *token.FileSet
	Packages []*Package
}

func LoadPackages

func LoadPackages(args []string, opts LoadOptions) (*Packages, error)

func (*Packages) Filter

func (c *Packages) Filter(f func(pkg *Package) bool) *Packages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL