diff options
| author | Joseph Richey <joerichey@google.com> | 2018-08-30 13:41:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-30 13:41:49 -0700 |
| commit | 0f451a722918f39fa07bd9337e4a14ca154b13ae (patch) | |
| tree | 9868ffed8cb74357a06e63b88c56d71b13b415af /vendor/github.com/kisielk/gotool/tool.go | |
| parent | 1e1b67dae6c3ae3b5acb5ce377b01b286c3e676b (diff) | |
| parent | 1c9bafdec78b8f238a82314b6d9c566a951486c2 (diff) | |
Merge pull request #107 from google/mod
Use Go Modules and support Go 1.11 building
Diffstat (limited to 'vendor/github.com/kisielk/gotool/tool.go')
| -rw-r--r-- | vendor/github.com/kisielk/gotool/tool.go | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/vendor/github.com/kisielk/gotool/tool.go b/vendor/github.com/kisielk/gotool/tool.go deleted file mode 100644 index c7409e1..0000000 --- a/vendor/github.com/kisielk/gotool/tool.go +++ /dev/null @@ -1,48 +0,0 @@ -// Package gotool contains utility functions used to implement the standard -// "cmd/go" tool, provided as a convenience to developers who want to write -// tools with similar semantics. -package gotool - -import "go/build" - -// Export functions here to make it easier to keep the implementations up to date with upstream. - -// DefaultContext is the default context that uses build.Default. -var DefaultContext = Context{ - BuildContext: build.Default, -} - -// A Context specifies the supporting context. -type Context struct { - // BuildContext is the build.Context that is used when computing import paths. - BuildContext build.Context -} - -// ImportPaths returns the import paths to use for the given command line. -// -// The path "all" is expanded to all packages in $GOPATH and $GOROOT. -// The path "std" is expanded to all packages in the Go standard library. -// The path "cmd" is expanded to all Go standard commands. -// The string "..." is treated as a wildcard within a path. -// When matching recursively, directories are ignored if they are prefixed with -// a dot or an underscore (such as ".foo" or "_foo"), or are named "testdata". -// Relative import paths are not converted to full import paths. -// If args is empty, a single element "." is returned. -func (c *Context) ImportPaths(args []string) []string { - return c.importPaths(args) -} - -// ImportPaths returns the import paths to use for the given command line -// using default context. -// -// The path "all" is expanded to all packages in $GOPATH and $GOROOT. -// The path "std" is expanded to all packages in the Go standard library. -// The path "cmd" is expanded to all Go standard commands. -// The string "..." is treated as a wildcard within a path. -// When matching recursively, directories are ignored if they are prefixed with -// a dot or an underscore (such as ".foo" or "_foo"), or are named "testdata". -// Relative import paths are not converted to full import paths. -// If args is empty, a single element "." is returned. -func ImportPaths(args []string) []string { - return DefaultContext.importPaths(args) -} |