packages

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DbgNoRemoveTempFile = 1 << iota
)

Variables

View Source
var (
	ErrWorkDirNotFound = errors.New("loadDeps: WorkingDir $WORK not found")
)

Functions

func List

func List(conf *Config, pattern ...string) (pkgPaths []string, err error)

func Load

func Load(conf *Config, pattern ...string) (pkgs []*types.Package, err error)

func SetDebug added in v1.9.1

func SetDebug(dbgFlags int)

Types

type Config

type Config struct {
	// ModRoot specifies module root directory (required).
	ModRoot string

	// ModPath specifies module path (required).
	ModPath string

	// Loaded specifies all loaded packages (optional).
	Loaded map[string]*types.Package

	// Fset provides source position information for syntax trees and types (optional).
	// If Fset is nil, Load will use a new fileset, but preserve Fset's value.
	Fset *token.FileSet
}

type ExecCmdError

type ExecCmdError struct {
	Err    error
	Stderr []byte
}

func (*ExecCmdError) Error

func (p *ExecCmdError) Error() string

type Importer

type Importer struct {
	// contains filtered or unexported fields
}

func NewImporter

func NewImporter(conf *Config, pattern ...string) (p *Importer, pkgPaths []string, err error)

func (*Importer) Close added in v1.9.4

func (p *Importer) Close() error

func (*Importer) Import

func (p *Importer) Import(pkgPath string) (*types.Package, error)

type PkgToLoad

type PkgToLoad struct {
	ImportPath     string
	Root           string
	Export         string
	GoFiles        []string
	IgnoredGoFiles []string
	Imports        []string
	Deps           []string
}

func LoadPkgs

func LoadPkgs(dir string, pattern ...string) (pkgs []*PkgToLoad, err error)

Jump to

Keyboard shortcuts

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