# Functions
CheckProjectRoot checks if the current dir is the project root, and returns an error if not.
No description provided by the author
the project root pkg (based on gomod location).
GetGoPkg returns the current directory's import path by parsing it from wd if this project's repository path is rooted under $GOPATH/src, or from go.mod the project uses Go modules to manage dependencies.
the project root dir (based on gomod location).
GoBuild runs "go build" configured with opts.
GoCmd runs "go {cmd}".
From https://github.com/golang/go/wiki/Modules: You can activate module support in one of two ways: - Invoke the go command in a directory outside of the $GOPATH/src tree, with a valid go.mod file in the current directory or any parent of it and the environment variable GO111MODULE unset (or explicitly set to auto).
absolute path to go.mod file for current dir.
gets the go package for the group.
GoTest runs "go test" configured with opts.
No description provided by the author
No description provided by the author
gets the directory.
returns absolute path to the diretory containing the .go file containing the calling function.
returns absolute path to the .go file containing the calling function.
No description provided by the author
MustInProjectRoot checks if the current dir is the project root, and exits if not.
MustSetWdGopath sets GOPATH to the first element of the path list in currentGopath that prefixes the wd, then returns the set path.
No description provided by the author
SetGoVerbose sets GOFLAGS="${GOFLAGS} -v" if GOFLAGS does not already contain "-v" to make "go" command output verbose.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
# Structs
GoCmdOptions is the base option set for "go" subcommands.
GoTestOptions is the set of options for "go test".