util

package
v1.3.1119 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AppName is tge application name for logging.
	AppName = "codegen"
)

Variables

This section is empty.

Functions

func AppLogger

func AppLogger() *log.Entry

AppLogger returns the application logger.

func EnsureGoPath

func EnsureGoPath() error

EnsureGoPath ensures the GOPATH environment variable is set and points to a valid directory.

func GetModuleRequirements

func GetModuleRequirements(dir string) (map[string]map[string]string, error)

GetModuleRequirements returns the requirements for the GO module rooted in dir It returns a map[<module name>]map[<requirement name>]<requirement version>

func GoGet

func GoGet(path string, version string, goModules bool) error

GoGet runs go get to install the specified binary.

func GoPath

func GoPath() string

GoPath returns the first element of the GOPATH. The empty string is returned if GOPATH is not set.

func GoPathBin

func GoPathBin() string

GoPathBin returns the bin directory of the first GOPATH element.

func GoPathSrc

func GoPathSrc() string

GoPathSrc returns the src directory of the first GOPATH element.

func SetLevel

func SetLevel(s string) error

SetLevel sets the logging level

Types

This section is empty.

Jump to

Keyboard shortcuts

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