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.

FakeContext is referenced in 0 repositories