pathutil

package
Version: v0.0.0-...-40ddaca Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IgnorePrefix = []string{
	".",
	"_",
	"vendor/",
	"testdata/",
}

Functions

func Gopath

func Gopath() string

Gopath gets GOPATH from environment and return the most relevant path.

A GOPATH can contain a colon-separated list of paths. This retrieves the GOPATH and returns only the FIRST ("most relevant") path.

This should be used carefully. If, for example, you are looking for a package, you may be better off using Gopaths.

func Gopaths

func Gopaths() []string

Gopaths retrieves the Gopath as a list when there is more than one path listed in the Gopath.

func HasSrc

func HasSrc(wd string, any bool) bool

func Ignore

func Ignore(wd string) bool

func Name

func Name(wd string) string

Name returns the name of the current package.

func Subpaths

func Subpaths(base string, onlySrc bool) []string

func WhichGopath

func WhichGopath(wd string) string

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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