package
0.1.7
Repository: https://github.com/polaris1119/tools.git
Documentation: pkg.go.dev

# Packages

The gopackages command is a diagnostic tool that demonstrates how to use github.com/polaris1119/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
Deprecated: LoadAllSyntax exists for historical compatibility and should not be used.
Deprecated: LoadFiles exists for historical compatibility and should not be used.
Deprecated: LoadImports exists for historical compatibility and should not be used.
Deprecated: LoadSyntax exists for historical compatibility and should not be used.
Deprecated: LoadTypes exists for historical compatibility and should not be used.
NeedCompiledGoFiles adds CompiledGoFiles.
NeedDeps adds the fields requested by the LoadMode in the packages in Imports.
NeedExportsFile adds ExportFile.
NeedFiles adds GoFiles and OtherFiles.
NeedImports adds Imports.
NeedModule adds Module.
NeedName adds Name and PkgPath.
NeedSyntax adds Syntax.
NeedTypes adds Types, Fset, and IllTyped.
NeedTypesInfo adds TypesInfo.
NeedTypesSizes adds TypesSizes.
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.
Module provides module information for a package.
ModuleError holds errors loading a module.
OverlayJSON is the format overlay files are expected to be in.
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 controls the amount of detail to return when loading.