util

package
v0.4.0-rc8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoNetwork = errors.New("Networking not available to load resource")
	ErrNotFound  = errors.New("Failed to find resource")
)

Functions

func Contains

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

func Convert added in v0.2.0

func Convert(from, to interface{}) error

func Copy

func Copy(d interface{}) interface{}

func DirLs

func DirLs(dir string) ([]interface{}, error)

func Equal

func Equal(l, r interface{}) interface{}

func FileCopy

func FileCopy(src, dest string) (err error)

func Filter

func Filter(xs []interface{}, p func(x interface{}) bool) []interface{}

func FilterStrings

func FilterStrings(xs []string, p func(x string) bool) []string

func FlatMap

func FlatMap(xs []interface{}, f func(x interface{}) []interface{}) []interface{}

func FlatMapStrings

func FlatMapStrings(xs []string, f func(x string) []string) []string

func GetFsType

func GetFsType(device string) (string, error)

func GetServices added in v0.3.0

func GetServices(urls []string) ([]string, error)

func IsRunningInTty

func IsRunningInTty() bool

func KVPairs2Map added in v0.3.1

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

func LoadResource added in v0.3.0

func LoadResource(location string, network bool, urls []string) ([]byte, error)

func Map

func Map(xs []interface{}, f func(x interface{}) interface{}) []interface{}

func Map2KVPairs added in v0.3.1

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

func MapCopy

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

func MapsDifference

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

func MapsIntersection

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

func MapsUnion

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

func Mount

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

func Replace

func Replace(l, r interface{}) interface{}

func ResolveDevice

func ResolveDevice(spec string) string

func SliceCopy

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

func ToStrings

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

func TrimSplit

func TrimSplit(str, sep string) []string

func TrimSplitN

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

Types

type AnyMap

type AnyMap map[interface{}]interface{}

type Backoff

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

func (*Backoff) Close

func (b *Backoff) Close() error

func (*Backoff) Start

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

type ReturnsErr

type ReturnsErr func() error

Jump to

Keyboard shortcuts

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