util

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPathLengthWindows = 260

Variables

This section is empty.

Functions

func RunPowershellCmd

func RunPowershellCmd(command string, envs ...string) ([]byte, error)

func SetKeyValueInMap

func SetKeyValueInMap(m map[string]string, key, value string)

SetKeyValueInMap set key/value pair in map key in the map is case insensitive, if key already exists, overwrite existing value

func WaitUntilTimeout

func WaitUntilTimeout(timeout time.Duration, execFunc ExecFunc, timeoutFunc TimeoutFunc) error

WaitUntilTimeout waits for the exec function to complete or return timeout error

Types

type ExecFunc

type ExecFunc func() (err error)

ExecFunc returns a exec function's output and error

type TimeoutFunc

type TimeoutFunc func() (err error)

TimeoutFunc returns output and error if an ExecFunc timeout

Jump to

Keyboard shortcuts

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