util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(from, to interface{}) error

func Copy

func Copy(d interface{}) interface{}

func DecodeBase64Content

func DecodeBase64Content(content string) ([]byte, error)

func DecodeContent

func DecodeContent(content string, encoding string) ([]byte, error)

func DecodeGzipContent

func DecodeGzipContent(content string) ([]byte, error)

func DecompressGzip

func DecompressGzip(content []byte) ([]byte, error)

func EnsureDirectoryExists

func EnsureDirectoryExists(dir string) error

func Env2Map

func Env2Map(env []string) map[string]string

func ExistsAndExecutable

func ExistsAndExecutable(path string) bool

func FileCopy

func FileCopy(src, dest string) error

func FilterKeys

func FilterKeys(data map[interface{}]interface{}, key []string) (filtered, rest map[interface{}]interface{})

func GenTemplate

func GenTemplate(in io.Reader, out io.Writer) error

func GetValue

func GetValue(args string, data map[interface{}]interface{}) (interface{}, map[interface{}]interface{})

func HTTPDownloadToFile

func HTTPDownloadToFile(url, dest string) error

func HTTPLoadBytes

func HTTPLoadBytes(url string) ([]byte, error)

func MapCopy

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

func RunScript

func RunScript(path string, arg ...string) error

func SetValue

func SetValue(args string, data map[interface{}]interface{}, value interface{}) (interface{}, map[interface{}]interface{})

func SliceCopy

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

func UnescapeKernelParams

func UnescapeKernelParams(s string) string

func UnmarshalValue

func UnmarshalValue(value string) (result interface{})

func WriteFileAtomic

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

func WriteToFile

func WriteToFile(data interface{}, filename string) error

func Yes

func Yes(question string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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