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

Function Float64PtrFromStrMap

pkg/lib/configreader/float64_ptr.go:81–95  ·  view source on GitHub ↗
(key string, sMap map[string]string, v *Float64PtrValidation)

Source from the content-addressed store, hash-verified

79}
80
81func Float64PtrFromStrMap(key string, sMap map[string]string, v *Float64PtrValidation) (*float64, error) {
82 valStr, ok := sMap[key]
83 if !ok || valStr == "" {
84 val, err := ValidateFloat64PtrMissing(v)
85 if err != nil {
86 return nil, errors.Wrap(err, key)
87 }
88 return val, nil
89 }
90 val, err := Float64PtrFromStr(valStr, v)
91 if err != nil {
92 return nil, errors.Wrap(err, key)
93 }
94 return val, nil
95}
96
97func Float64PtrFromStr(valStr string, v *Float64PtrValidation) (*float64, error) {
98 if valStr == "" {

Callers

nothing calls this directly

Calls 3

WrapFunction · 0.92
Float64PtrFromStrFunction · 0.85

Tested by

no test coverage detected