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

Function Int64FromStr

pkg/lib/configreader/int64.go:90–99  ·  view source on GitHub ↗
(valStr string, v *Int64Validation)

Source from the content-addressed store, hash-verified

88}
89
90func Int64FromStr(valStr string, v *Int64Validation) (int64, error) {
91 if valStr == "" {
92 return ValidateInt64Missing(v)
93 }
94 casted, castOk := s.ParseInt64(valStr)
95 if !castOk {
96 return 0, ErrorInvalidPrimitiveType(valStr, PrimTypeInt)
97 }
98 return ValidateInt64Provided(casted, v)
99}
100
101func Int64FromEnv(envVarName string, v *Int64Validation) (int64, error) {
102 valStr := ReadEnvVar(envVarName)

Callers 5

Int64FromStrMapFunction · 0.85
Int64FromEnvFunction · 0.85
Int64FromFileFunction · 0.85
Int64FromPromptFunction · 0.85
StructFromStringMapFunction · 0.85

Calls 3

ValidateInt64MissingFunction · 0.85
ValidateInt64ProvidedFunction · 0.85

Tested by

no test coverage detected