util

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blkid added in v0.8.2

func Blkid(label string) (deviceName, deviceType string)

func Contains

func Contains(values []string, value string) bool

func Convert added in v0.2.0

func Convert(from, to interface{}) error

func ConvertIgnoreOmitEmpty added in v0.4.4

func ConvertIgnoreOmitEmpty(from, to interface{}) error

func Copy added in v0.4.0

func Copy(d interface{}) interface{}

func ExistsAndExecutable added in v0.6.0

func ExistsAndExecutable(path string) bool

func FileCopy added in v0.4.0

func FileCopy(src, dest string) error

func GetCurrentContainerID added in v0.8.0

func GetCurrentContainerID() (string, error)

func GetFsType

func GetFsType(device string) (string, error)

func IsRunningInTty

func IsRunningInTty() bool

func KVPairs2Map added in v0.3.1

func KVPairs2Map(kvs []string) map[string]string

func Map2KVPairs added in v0.3.1

func Map2KVPairs(m map[string]string) []string

func MapCopy added in v0.4.0

func MapCopy(data map[interface{}]interface{}) map[interface{}]interface{}

func Merge added in v0.5.0

func Merge(left, right map[interface{}]interface{}) map[interface{}]interface{}

func Mount

func Mount(device, directory, fsType, options string) error

func RemoveString added in v0.5.0

func RemoveString(slice []string, s string) []string

func ResolveDevice

func ResolveDevice(spec string) string

ResolveDevice this isn't reliable - blkid -L LABEL works more often :(

func RunCommandSequence added in v0.8.0

func RunCommandSequence(commandSequence []osYaml.StringandSlice)

func RunScript added in v0.8.0

func RunScript(path string) error

func SliceCopy added in v0.4.0

func SliceCopy(data []interface{}) []interface{}

func ToStrings added in v0.4.0

func ToStrings(data []interface{}) []string

func TrimSplit added in v0.4.0

func TrimSplit(str, sep string) []string

func TrimSplitN added in v0.4.0

func TrimSplitN(str, sep string, count int) []string

func UnescapeKernelParams added in v0.6.0

func UnescapeKernelParams(s string) string

func Unmount added in v0.8.0

func Unmount(target string) error

func WriteFileAtomic added in v0.5.0

func WriteFileAtomic(filename string, data []byte, perm os.FileMode) error

Types

type AnyMap added in v0.4.0

type AnyMap map[interface{}]interface{}

type Backoff added in v0.4.0

type Backoff struct {
	StartMillis, MaxIntervalMillis, MaxMillis int
	// contains filtered or unexported fields
}

func (*Backoff) Close added in v0.4.0

func (b *Backoff) Close() error

func (*Backoff) Start added in v0.4.0

func (b *Backoff) Start() <-chan bool

type ReturnsErr

type ReturnsErr func() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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