Documentation
¶
Index ¶
- Variables
- func ByteToString(orig []byte) string
- func GetEnv(key string, dfault string, combineWith ...string) string
- func GetEnvWithContext(ctx context.Context, key string, dfault string, combineWith ...string) string
- func HexToUint32(hex string) uint32
- func HostDev(combineWith ...string) string
- func HostDevWithContext(ctx context.Context, combineWith ...string) string
- func HostEtc(combineWith ...string) string
- func HostEtcWithContext(ctx context.Context, combineWith ...string) string
- func HostProc(combineWith ...string) string
- func HostProcMountInfoWithContext(ctx context.Context, combineWith ...string) string
- func HostProcWithContext(ctx context.Context, combineWith ...string) string
- func HostRoot(combineWith ...string) string
- func HostRootWithContext(ctx context.Context, combineWith ...string) string
- func HostRun(combineWith ...string) string
- func HostRunWithContext(ctx context.Context, combineWith ...string) string
- func HostSys(combineWith ...string) string
- func HostSysWithContext(ctx context.Context, combineWith ...string) string
- func HostVar(combineWith ...string) string
- func HostVarWithContext(ctx context.Context, combineWith ...string) string
- func IntContains(target []int, src int) bool
- func IntToString(orig []int8) string
- func IsContainerized() (bool, error)
- func ParseFloat(s string) float64
- func ParseUint64(s string) uint64
- func PathExists(filename string) bool
- func PathExistsWithContents(filename string) bool
- func ReadFile(filename string) (string, error)
- func ReadFileNoStat(filename string) ([]byte, error)
- func ReadInts(filename string) ([]int64, error)
- func ReadLine(filename string, prefix string) (string, error)
- func ReadLines(filename string) ([]string, error)
- func ReadLinesOffsetN(filename string, offset uint, n int) ([]string, error)
- func Round(val float64, n int) float64
- func Sleep(ctx context.Context, interval time.Duration) error
- func StringsContains(target []string, src string) bool
- func StringsHas(target []string, src string) bool
- func UintToString(orig []uint8) string
- type FakeInvoke
- type Invoke
- type Invoker
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ByteToString ¶
func GetEnvWithContext ¶
func HexToUint32 ¶
func HostDevWithContext ¶
func HostEtcWithContext ¶
func HostProcWithContext ¶
func HostRootWithContext ¶
func HostRunWithContext ¶
func HostSysWithContext ¶
func HostVarWithContext ¶
func IntContains ¶
func IntToString ¶
func IsContainerized ¶
func ParseFloat ¶
func ParseUint64 ¶
func PathExists ¶
func PathExistsWithContents ¶
func ReadFileNoStat ¶
ReadFileNoStat uses ioutil.ReadAll to read contents of entire file. This is similar to ioutil.ReadFile but without the call to os.Stat, because many files in /proc and /sys report incorrect file sizes (either 0 or 4096). Reads a max file size of 512kB. For files larger than this, a scanner should be used.
func ReadLine ¶
ReadLine reads a file and returns the first occurrence of a line that is prefixed with prefix.
func ReadLinesOffsetN ¶
ReadLinesOffsetN reads contents from file and splits them by new line. The offset tells at which line number to start. The count determines the number of lines to read (starting from offset): n >= 0: at most n lines n < 0: whole file
func StringsContains ¶
func StringsHas ¶
func UintToString ¶
Types ¶
type FakeInvoke ¶
func (FakeInvoke) CommandWithContext ¶
Click to show internal directories.
Click to hide internal directories.