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

Function Int32ListFromInterfaceMap

pkg/lib/configreader/int32_list.go:53–67  ·  view source on GitHub ↗
(key string, iMap map[string]interface{}, v *Int32ListValidation)

Source from the content-addressed store, hash-verified

51}
52
53func Int32ListFromInterfaceMap(key string, iMap map[string]interface{}, v *Int32ListValidation) ([]int32, error) {
54 inter, ok := ReadInterfaceMapValue(key, iMap)
55 if !ok {
56 val, err := ValidateInt32ListMissing(v)
57 if err != nil {
58 return nil, errors.Wrap(err, key)
59 }
60 return val, nil
61 }
62 val, err := Int32List(inter, v)
63 if err != nil {
64 return nil, errors.Wrap(err, key)
65 }
66 return val, nil
67}
68
69func ValidateInt32ListMissing(v *Int32ListValidation) ([]int32, error) {
70 if v.Required {

Callers 1

StructFunction · 0.85

Calls 4

WrapFunction · 0.92
ReadInterfaceMapValueFunction · 0.85
ValidateInt32ListMissingFunction · 0.85
Int32ListFunction · 0.85

Tested by

no test coverage detected