conv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2020 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastAsStringMap

func CastAsStringMap(input map[string]interface{}) (map[string]string, error)

CastAsStringMap takes a map[string]interface{} and down-casts it to a map[string]string asserting that all values are strings.

func InferTypedMap

func InferTypedMap(in map[string]string) map[string]interface{}

InferTypedMap takes a map[string]string and attempts to infer the value types, converting the input to a map[string]interface{}.

func ParseKeyValues

func ParseKeyValues(in []string) (res map[string]string, err error)

ParseKeyValues converts a slice of ["KEY1=VAL1", "KEY2=VAL2", ...] dictionary values into a map[string]string, reporting errors if the input is malformed.

func ToEnvVar

func ToEnvVar(input map[string]string) []v1.EnvVar

func ToOptionsSlice

func ToOptionsSlice(input map[string]string) []string

ToOptionsSlice takes an options map and returns a slice of form ["KEY1=VAL1", "KEY2=VAL2", ...], suitable for Docker commands.

Types

This section is empty.

Jump to

Keyboard shortcuts

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