utils

package
v0.15.17 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, item string) bool

func Convert added in v0.15.0

func Convert(src, target interface{}) error

Convert converts a struct (src) to another one (target) using yaml marshalling/unmarshalling. If the structure are not compatible, this will throw an error as the unmarshalling will fail.

func ConvertByJSON added in v0.15.0

func ConvertByJSON(src, target interface{}) error

ConvertByJSON converts a struct (src) to another one (target) using json marshalling/unmarshalling. If the structure are not compatible, this will throw an error as the unmarshalling will fail.

func CopyMap added in v0.15.0

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

func CopySlice added in v0.15.0

func CopySlice(s []string) []string

func IsSelected added in v0.15.0

func IsSelected(selected []string, name string) bool

func MapUnion

func MapUnion(left, right map[string]string) map[string]string

func MapUnionI added in v0.15.0

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

func NestedMapsToMapInterface

func NestedMapsToMapInterface(data map[string]interface{}) map[string]interface{}

func RetryOnError added in v0.15.7

func RetryOnError(count int, f func() error) error

func ToMapByte added in v0.15.0

func ToMapByte(data map[string]string) map[string][]byte

func ToMapInterface

func ToMapInterface(data map[string]string) map[string]interface{}

func ToMapString added in v0.15.0

func ToMapString(data map[string]interface{}) map[string]string

Types

This section is empty.

Jump to

Keyboard shortcuts

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