importer

package module
v0.0.0-...-4a9ab55 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: MIT Imports: 8 Imported by: 0

README

importer

Utilities to resolve a Go package from a variety of source directory layouts.

Build status

Unix: travis-cs status

Documentation

Overview

importer provides mechanisms for loading go/build.Package structures from source packages on disk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Importer

type Importer interface {

	// Import imports the package from importpath.
	Import(importpath string) (*build.Package, error)

	// Before searchs this importer before the child.
	Before(child Importer) Importer

	// After searches this importer after the child.
	After(child Importer) Importer
}

Importer imports a package.

func GOROOT

func GOROOT(ctx *build.Context) Importer

GOROOT returns an Importer which loads packages from the standard library.

type ImporterFn

type ImporterFn func(importpath string) (*build.Package, error)

ImporterFn converts a func(string) (*build.Package, error) to an Importer.

func (ImporterFn) Import

func (fn ImporterFn) Import(importpath string) (*build.Package, error)

Jump to

Keyboard shortcuts

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