vgoimporter: Index | Files

package srcimporter

import ""


Package Files


type Importer Uses

type Importer struct {
    // contains filtered or unexported fields

func New Uses

func New(resolver Resolver, ctxt *build.Context, fset *token.FileSet, packages map[string]*types.Package) *Importer

func (*Importer) Import Uses

func (p *Importer) Import(path string) (*types.Package, error)

Import(path) is a shortcut for ImportFrom(path, ".", 0).

func (*Importer) ImportFrom Uses

func (p *Importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error)

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 PkgInfo Uses

type PkgInfo struct {
    ImportPath  string
    Dir         string
    Export      string
    Standard    bool
    Name        string
    GoFiles     []string
    CgoFiles    []string
    TestImports []string

type Resolver Uses

type Resolver func(string) (*PkgInfo, error)

Package srcimporter imports 11 packages (graph) and is imported by 1 packages. Updated 2018-09-29. Refresh now. Tools for package owners.