loader

package
v0.0.0-...-fb34658 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadGoRepo

func LoadGoRepo(importPath string, buildCtx build.Context) (string, error)

Loads a Go repo and returns an absolute directory path.

The Go repo may or may not have a pets file.

Callers can inject their own GOROOT/GOPATH. The default build.Context is build.Default. https://golang.org/pkg/go/build/#Default

TODO(nick): Long-term, we will need to have some way to give PETS more control over which version of the repo loads.

I personally think that the MVS (minimal version selection) approach is promising, where each repo has a .petslock file that describes the minimum version of its dependencies, and the user can specify later versions.

Right now we do the dumbest possible thing of doing a 'go get', which will get the repo if it doesn't exist and use the repo on disk if it does exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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