package
0.0.0-20190318102628-d7df357d3e99
Repository: https://github.com/go-zh/tools.git
Documentation: pkg.go.dev

# Packages

The gopackages command is a diagnostic tool that demonstrates how to use github.com/Go-zh/tools/go/packages to load, parse, type-check, and print one or more Go packages.
Package packagestest creates temporary projects on disk for testing go tools on.

# Functions

Load loads and returns the Go packages named by the given patterns.
PrintErrors prints to os.Stderr the accumulated errors of all packages in the import graph rooted at pkgs, dependencies first.
Visit visits all the packages in the import graph whose roots are pkgs, calling the optional pre function the first time each package is encountered (preorder), and the optional post function after a package's dependencies have been visited (postorder).

# Constants

No description provided by the author
LoadAllSyntax adds typed syntax trees for the packages matching the patterns and all dependencies.
LoadFiles finds the packages and computes their source file lists.
LoadImports adds import information for each package and its dependencies.
LoadSyntax adds typed syntax trees for the packages matching the patterns.
LoadTypes adds type information for package-level declarations in the packages matching the patterns.
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

A Config specifies details about how packages should be loaded.
An Error describes a problem with a package's metadata, syntax, or types.
A Package describes a loaded Go package.

# Type aliases

ErrorKind describes the source of the error, allowing the user to differentiate between errors generated by the driver, the parser, or the type-checker.
A LoadMode specifies the amount of detail to return when loading.