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

Function InterfaceMap

pkg/lib/configreader/interface_map.go:41–47  ·  view source on GitHub ↗
(inter interface{}, v *InterfaceMapValidation)

Source from the content-addressed store, hash-verified

39}
40
41func InterfaceMap(inter interface{}, v *InterfaceMapValidation) (map[string]interface{}, error) {
42 casted, castOk := cast.InterfaceToStrInterfaceMap(inter)
43 if !castOk {
44 return nil, ErrorInvalidPrimitiveType(inter, PrimTypeMap)
45 }
46 return ValidateInterfaceMapProvided(casted, v)
47}
48
49func InterfaceMapFromInterfaceMap(key string, iMap map[string]interface{}, v *InterfaceMapValidation) (map[string]interface{}, error) {
50 inter, ok := ReadInterfaceMapValue(key, iMap)

Callers 1

Calls 3

Tested by

no test coverage detected