Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(ctx *PackedContext, filename string) types.ImporterFrom
Types ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func (*Importer) ImportFrom ¶
ImportFrom imports the package with the given import path resolved from the given srcDir, adds the new package to the set of packages maintained by the importer, and returns the package. Package path resolution and file system operations are controlled by the context maintained with the importer. The import mode must be zero but is otherwise ignored. Packages that are not comprised entirely of pure Go files may fail to import because the type checker may not be able to determine all exported entities (e.g. due to cgo dependencies).
type PackedContext ¶
type PackedContext struct { GOARCH string GOOS string GOROOT string GOPATH string CgoEnabled bool UseAllFiles bool Compiler string BuildTags []string ReleaseTags []string InstallSuffix string }
PackedContext is a copy of build.Context without the func fields.
TODO(mdempsky): Not sure this belongs here.
func PackContext ¶
func PackContext(ctx *build.Context) PackedContext
Click to show internal directories.
Click to hide internal directories.