packages

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverRequest

type DriverRequest struct {
	Mode       packages.LoadMode `json:"mode"`
	Env        []string          `json:"env"`
	BuildFlags []string          `json:"build_flags"`
	Tests      bool              `json:"tests"`
	Overlay    map[string][]byte `json:"overlay"`
}

DriverRequest is copied from go/packages; it's the format of config that we get on stdin.

type DriverResponse

type DriverResponse struct {
	NotHandled bool
	Sizes      *types.StdSizes
	Roots      []string `json:",omitempty"`
	Packages   []*packages.Package
}

DriverResponse is copied from go/packages; it's our response about packages we've loaded.

func Load

func Load(req *DriverRequest, files []string) (*DriverResponse, error)

Load reads a set of packages and returns information about them. Most of the request structure isn't honoured at the moment.

func LoadOffline added in v1.12.0

func LoadOffline(req *DriverRequest, searchDir string, files []string) (*DriverResponse, error)

LoadOffline is like Load but rather than querying plz to find the file to load, it just walks a file tree looking for pkg_info.json files.

Jump to

Keyboard shortcuts

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