MCPcopy Index your code
hub / github.com/cortexlabs/cortex / StringMap

Function StringMap

pkg/lib/configreader/string_map.go:36–42  ·  view source on GitHub ↗
(inter interface{}, v *StringMapValidation)

Source from the content-addressed store, hash-verified

34}
35
36func StringMap(inter interface{}, v *StringMapValidation) (map[string]string, error) {
37 casted, castOk := cast.InterfaceToStrStrMap(inter)
38 if !castOk {
39 return nil, ErrorInvalidPrimitiveType(inter, PrimTypeStringToStringMap)
40 }
41 return ValidateStringMapProvided(casted, v)
42}
43
44func StringMapFromInterfaceMap(key string, iMap map[string]interface{}, v *StringMapValidation) (map[string]string, error) {
45 inter, ok := ReadInterfaceMapValue(key, iMap)

Callers 1

Calls 3

InterfaceToStrStrMapFunction · 0.92

Tested by

no test coverage detected