gotools/go/buildutil/fakecontext.go

// FakeContext returns a build.Context for the fake file tree specified
// by pkgs, which maps package import paths to a mapping from file base
// names to contents.
//
// The fake Context has a GOROOT of "/go" and no GOPATH, and overrides
// the necessary file access methods to read from memory instead of the
// real file system.
//
// Unlike a real file tree, the fake one has only two levels---packages
// and files---so ReadDir("/go/src/") returns all packages under
// /go/src/ including, for instance, "math" and "math/big".
// ReadDir("/go/src/math/big") would return all the files in the
// "math/big" package.
func FakeContext(pkgs map[string]map[string]string) *build.Context {}

type byName

func (s byName) Len() int           {}

func (s byName) Swap(i, j int)      {}

func (s byName) Less(i, j int) bool {}

type fakeFileInfo

func (fi fakeFileInfo) Name() string    {}

func (fakeFileInfo) Sys() interface{}

func (fakeFileInfo) ModTime() time.Time {}

func (fakeFileInfo) IsDir() bool        {}

func (fakeFileInfo) Size() int64        {}

func (fakeFileInfo) Mode() os.FileMode  {}

type fakeDirInfo

func (fd fakeDirInfo) Name() string    {}

func (fakeDirInfo) Sys() interface{}

func (fakeDirInfo) ModTime() time.Time {}

func (fakeDirInfo) IsDir() bool        {}

func (fakeDirInfo) Size() int64        {}

func (fakeDirInfo) Mode() os.FileMode  {}