importpaths

package
v0.0.0-...-6c909a5 Latest Latest
Warning

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

Go to latest
Published: May 24, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package importpaths exposes part of the functionality in the go tool for referring to import paths, typically from the command line arguments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPackages

func AllPackages(pattern string) ([]string, error)

AllPackages returns all the packages that can be found under the $GOPATH directories matching pattern. The pattern is either "all" (all packages) or a path including "...".

func AllPackagesInFS

func AllPackagesInFS(pattern string) ([]string, error)

AllPackagesInFS is like AllPackages but is passed a pattern beginning ./ or ../, meaning it should scan the tree rooted at the given directory. There are ... in the pattern too.

func ImportPaths

func ImportPaths(args []string) ([]string, []error)

ImportPaths returns the import paths to use for the given command line.

func ImportPathsNoDotExpansion

func ImportPathsNoDotExpansion(args []string) []string

ImportPathsNoDotExpansion returns the import paths to use for the given command line, but it does no ... expansion.

func IsStandardImportPath

func IsStandardImportPath(path string) bool

IsStandardImportPath reports whether $GOROOT/src/path should be considered part of the standard distribution. For historical reasons we allow people to add their own code to $GOROOT instead of using $GOPATH, but we assume that code will start with a domain name (dot in the first element).

Types

This section is empty.

Jump to

Keyboard shortcuts

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