Documentation ¶
Overview ¶
Package base defines shared basic pieces of the go command, in particular logging and the Command structure.
Index ¶
- func AppendPATH(base []string) []string
- func AppendPWD(base []string, dir string) []string
- func AtExit(f func())
- func Error(err error)
- func Errorf(format string, args ...any)
- func Exit()
- func ExitIfErrors()
- func Fatal(err error)
- func Fatalf(format string, args ...any)
- func GetExitStatus() int
- func SetExitStatus(n int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPATH ¶
AppendPATH returns the result of appending PATH=$GOROOT/bin:$PATH (or the platform equivalent) to the environment base.
func AppendPWD ¶
AppendPWD returns the result of appending PWD=dir to the environment base.
The resulting environment makes os.Getwd more efficient for a subprocess running in dir, and also improves the accuracy of paths relative to dir if one or more elements of dir is a symlink.
func ExitIfErrors ¶
func ExitIfErrors()
func GetExitStatus ¶
func GetExitStatus() int
func SetExitStatus ¶
func SetExitStatus(n int)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.