Documentation
¶
Index ¶
- Variables
- func AddToTar(tarWriter *tar.Writer, filePath, archivePath string) error
- func BinaryWithRuntimeExtension(stem string) string
- func CheckExist(path string) error
- func Clamp(v, minV, maxV int) int
- func CoalescePtr[T any](values ...*T) *T
- func ContainsMainGo(dir string) bool
- func FindGoModDir(startDir string) string
- func FindMainGoFile(binaryPath string) (string, error)
- func FlattenEnvs(envs map[string]string) []string
- func FormatBytes(bytes uint64) string
- func GetEnv[T any](key string) (*T, error)
- func GetEnvWithNoErr[T any](key string) *T
- func IsExcludedSourceDir(name string) bool
- func IsExecutableFile(filePath string) bool
- func MatchAnyFilepathGlob(file string, patterns []string) bool
- func MultiWriter(writers ...io.Writer) io.Writer
- func NilAsZero[T any](opt *T) T
- func NormalizeExePath(path string) string
- func PIDsByExePath() (map[string][]int, error)
- func ProcessCountByExePath() (map[string]int, error)
- func ProcessesByExePath() (map[string][]*process.Process, error)
- func SetEnvs(envMap map[string]string) (func(), error)
- func StderrIsTerminal() bool
- func StdoutIsTerminal() bool
- type TempStorageInfo
- type WriterFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEnvNotSet = errors.New("environment variable not set")
View Source
var ErrUnsupportedEnvType = errors.New("unsupported env type")
Functions ¶
func BinaryWithRuntimeExtension ¶ added in v0.0.18
func CheckExist ¶
func CoalescePtr ¶
func CoalescePtr[T any](values ...*T) *T
func ContainsMainGo ¶
func FindGoModDir ¶
func FindMainGoFile ¶
func FlattenEnvs ¶ added in v0.0.18
func FormatBytes ¶
func GetEnvWithNoErr ¶ added in v0.0.18
func IsExcludedSourceDir ¶ added in v0.0.18
func IsExecutableFile ¶ added in v0.0.18
func MatchAnyFilepathGlob ¶
func NormalizeExePath ¶
func PIDsByExePath ¶ added in v0.0.18
func ProcessCountByExePath ¶ added in v0.0.18
func ProcessesByExePath ¶ added in v0.0.18
func StderrIsTerminal ¶ added in v0.0.18
func StderrIsTerminal() bool
func StdoutIsTerminal ¶
func StdoutIsTerminal() bool
Types ¶
type TempStorageInfo ¶
func ResolveTempStorageInfo ¶
func ResolveTempStorageInfo(tempRoot string) TempStorageInfo
Click to show internal directories.
Click to hide internal directories.