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

Function Int64FromStrMap

pkg/lib/configreader/int64.go:74–88  ·  view source on GitHub ↗
(key string, sMap map[string]string, v *Int64Validation)

Source from the content-addressed store, hash-verified

72}
73
74func Int64FromStrMap(key string, sMap map[string]string, v *Int64Validation) (int64, error) {
75 valStr, ok := sMap[key]
76 if !ok || valStr == "" {
77 val, err := ValidateInt64Missing(v)
78 if err != nil {
79 return 0, errors.Wrap(err, key)
80 }
81 return val, nil
82 }
83 val, err := Int64FromStr(valStr, v)
84 if err != nil {
85 return 0, errors.Wrap(err, key)
86 }
87 return val, nil
88}
89
90func Int64FromStr(valStr string, v *Int64Validation) (int64, error) {
91 if valStr == "" {

Callers

nothing calls this directly

Calls 3

WrapFunction · 0.92
ValidateInt64MissingFunction · 0.85
Int64FromStrFunction · 0.85

Tested by

no test coverage detected