base

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package base defines shared basic pieces of the go command, in particular logging and the Command structure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPATH

func AppendPATH(base []string) []string

AppendPATH returns the result of appending PATH=$GOROOT/bin:$PATH (or the platform equivalent) to the environment base.

func AppendPWD

func AppendPWD(base []string, dir string) []string

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 AtExit

func AtExit(f func())

func Error

func Error(err error)

func Errorf

func Errorf(format string, args ...any)

func Exit

func Exit()

func ExitIfErrors

func ExitIfErrors()

func Fatal

func Fatal(err error)

func Fatalf

func Fatalf(format string, args ...any)

func GetExitStatus

func GetExitStatus() int

func SetExitStatus

func SetExitStatus(n int)

Types

This section is empty.

Jump to

Keyboard shortcuts

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