MCPcopy Create free account
hub / github.com/cortexlabs/cortex / Int64PtrFromStrMap

Function Int64PtrFromStrMap

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

WrapFunction · 0.92
ValidateInt64PtrMissingFunction · 0.85
Int64PtrFromStrFunction · 0.85

Tested by

no test coverage detected