resolver

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: MIT Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PackageNotFoundError = errors.New("package not found")

Functions

This section is empty.

Types

type IdentResolver

type IdentResolver interface {
	ResolveIdent(file *ast.File, parent ast.Node, id *ast.Ident) (path string, err error)
}

IdentResolver resolves an identifier to a local or remote reference.

Returns path == "" if the node is not a local or remote reference (e.g. a field in a composite literal, the selector in a selector expression etc.).

Returns path == "" is the node is a local reference.

Returns path != "" is the node is a remote reference.

type PackageResolver

type PackageResolver interface {
	ResolvePackage(path string) (string, error)
}

PackageResolver resolves a package path to a package name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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