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

Function Int64PtrFromEnvOrFile

pkg/lib/configreader/int64_ptr.go:152–158  ·  view source on GitHub ↗
(envVarName string, filePath string, v *Int64PtrValidation)

Source from the content-addressed store, hash-verified

150}
151
152func Int64PtrFromEnvOrFile(envVarName string, filePath string, v *Int64PtrValidation) (*int64, error) {
153 valStr := ReadEnvVar(envVarName)
154 if valStr != nil && *valStr != "" {
155 return Int64PtrFromEnv(envVarName, v)
156 }
157 return Int64PtrFromFile(filePath, v)
158}
159
160func Int64PtrFromPrompt(promptOpts *prompt.Options, v *Int64PtrValidation) (*int64, error) {
161 if v.Default != nil && promptOpts.DefaultStr == "" {

Callers

nothing calls this directly

Calls 3

ReadEnvVarFunction · 0.85
Int64PtrFromEnvFunction · 0.85
Int64PtrFromFileFunction · 0.85

Tested by

no test coverage detected