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

Function Float64PtrFromInterfaceMap

pkg/lib/configreader/float64_ptr.go:65–79  ·  view source on GitHub ↗
(key string, iMap map[string]interface{}, v *Float64PtrValidation)

Source from the content-addressed store, hash-verified

63}
64
65func Float64PtrFromInterfaceMap(key string, iMap map[string]interface{}, v *Float64PtrValidation) (*float64, error) {
66 inter, ok := ReadInterfaceMapValue(key, iMap)
67 if !ok {
68 val, err := ValidateFloat64PtrMissing(v)
69 if err != nil {
70 return nil, errors.Wrap(err, key)
71 }
72 return val, nil
73 }
74 val, err := Float64Ptr(inter, v)
75 if err != nil {
76 return nil, errors.Wrap(err, key)
77 }
78 return val, nil
79}
80
81func Float64PtrFromStrMap(key string, sMap map[string]string, v *Float64PtrValidation) (*float64, error) {
82 valStr, ok := sMap[key]

Callers 1

StructFunction · 0.85

Calls 4

WrapFunction · 0.92
ReadInterfaceMapValueFunction · 0.85
Float64PtrFunction · 0.85

Tested by

no test coverage detected