Documentation ¶
Index ¶
- func BasicAuth(username, password string) string
- func BuildDeepMapString(val interface{}, keys []string, level map[string]interface{})
- func BytesToString(data []byte) string
- func CheckErrFatal(err error, message string)
- func DecodeStringToBytes(data, format string) ([]byte, error)
- func EncodeBytesToString(data []byte, format string) (string, error)
- func EnvLookup(key, defaultValue string) string
- func EnvLookupAll() map[string]string
- func ExpandEnvOnArgs(args []string) []string
- func GetFreePort() (string, error)
- func GetRuntime() map[string]string
- func ISODateNow() string
- func IsK8sContextSafe(defaultContexts []string, envKey, currentContext string) bool
- func JoinStrings(separator string, stringValues ...string) string
- func MapToEnvStringSlice(env map[string]string) []string
- func MarshalJSON(obj interface{}, explode bool) (string, error)
- func MarshalJSONSafe(obj interface{}, explode bool) string
- func MergeMaps(maps ...map[string]interface{}) map[string]interface{}
- func StringToBytes(data string) []byte
- func UUIDV4() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDeepMapString ¶
BuildDeepMapString uses a slice of keys to build an n dimensional map[string]interface{} Be aware, providing an empty keys slice will result in a noop function
func BytesToString ¶
func DecodeStringToBytes ¶
func EnvLookupAll ¶
EnvLookupAll returns a map[string]string of all environment variables
func ExpandEnvOnArgs ¶
ExpandEnvOnArgs expands environmental variables from all strings in the arg list
func GetFreePort ¶
GetFreePort attempts to resolve localhost:0 *nix operating systems will return an unused port instead of resolving port 0
func GetRuntime ¶
GetRuntime returns runtime info as a map[string]string
func ISODateNow ¶
func ISODateNow() string
func IsK8sContextSafe ¶
IsK8sContextSafe return a slice of k8s safe contexts
func JoinStrings ¶
func MapToEnvStringSlice ¶
MapToEnvStringSlice converts a map of environmental variables to a string slice of kv pairs Useful for interfaces that require this data structure like docker
func MarshalJSON ¶
func MarshalJSONSafe ¶
func StringToBytes ¶
Types ¶
This section is empty.