MCPcopy
hub / github.com/cortexlabs/cortex / Int64FromEnvOrFile

Function Int64FromEnvOrFile

pkg/lib/configreader/int64.go:145–151  ·  view source on GitHub ↗
(envVarName string, filePath string, v *Int64Validation)

Source from the content-addressed store, hash-verified

143}
144
145func Int64FromEnvOrFile(envVarName string, filePath string, v *Int64Validation) (int64, error) {
146 valStr := ReadEnvVar(envVarName)
147 if valStr != nil && *valStr != "" {
148 return Int64FromEnv(envVarName, v)
149 }
150 return Int64FromFile(filePath, v)
151}
152
153func Int64FromPrompt(promptOpts *prompt.Options, v *Int64Validation) (int64, error) {
154 promptOpts.DefaultStr = s.Int64(v.Default)

Callers 1

MustInt64FromEnvOrFileFunction · 0.85

Calls 3

ReadEnvVarFunction · 0.85
Int64FromEnvFunction · 0.85
Int64FromFileFunction · 0.85

Tested by

no test coverage detected