util

package
v0.2.0-rc1 Latest Latest
Warning

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

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

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[string]interface{}, key []string) (filtered, rest map[string]interface{})

func HTTPDownloadToFile

func HTTPDownloadToFile(url, dest string) error

func HTTPLoadBytes

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

func MapCopy

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

func MaskPassword added in v0.2.0

func MaskPassword(r *os.File, w io.Writer) ([]byte, error)

func PromptPassword added in v0.2.0

func PromptPassword() (string, bool, error)

func PromptYes

func PromptYes(question string) bool

func RunScript

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

func SliceCopy

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

func UnescapeKernelParams

func UnescapeKernelParams(s string) string

func WriteFileAtomic

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

func WriteToFile

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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