util

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DepErrors added in v1.27.0

func DepErrors(pkgpath string, flags ...string) bool

DepErrors checks there are any errors resolving dependencies for `pkgpath`. It passes the `go list` command the flags specified by `flags`.

func DirExists added in v1.25.0

func DirExists(filename string) bool

DirExists tests whether `filename` exists and is a directory.

func FileExists added in v1.25.0

func FileExists(filename string) bool

FileExists tests whether the file at `filename` exists and is not a directory.

func GetModDir added in v1.25.0

func GetModDir(pkgpath string, flags ...string) string

GetModDir gets the absolute directory of the module containing the package with path `pkgpath`. It passes the `go list` the flags specified by `flags`.

func GetPkgDir added in v1.25.0

func GetPkgDir(pkgpath string, flags ...string) string

GetPkgDir gets the absolute directory containing the package with path `pkgpath`. It passes the `go list` command the flags specified by `flags`.

func Getenv

func Getenv(key string, aliases ...string) string

Getenv retrieves the value of the environment variable named by the key. If that variable is not present, it iterates over the given aliases until it finds one that is. If none are present, the empty string is returned.

func RunCmd added in v1.26.0

func RunCmd(cmd *exec.Cmd) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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