Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PackageNotFoundError = errors.New("package not found")
Functions ¶
This section is empty.
Types ¶
type Guess ¶
Guess is a map of package path -> package name. Names are resolved from this map, and if a name doesn't exist in the map, the package name is guessed from the last part of the path (after the last slash).
type IdentResolver ¶
type IdentResolver interface {
ResolveIdent(file *ast.File, parent ast.Node, id *ast.Ident) (string, error)
}
IdentResolver resolves an identifier to a package path. Returns an empty string if the node is not an identifier.
type Map ¶
Map is a map of package path -> package name. Names are resolved from this map, and if a name doesn't exist in the map, an error is returned. Note that Guess is not a NodeResolver, so can't properly resolve identifiers in dot import packages.
type PackageResolver ¶
PackageResolver resolves a package path to a package name.
Click to show internal directories.
Click to hide internal directories.