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

Function Int32PtrFromEnvOrFile

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

Source from the content-addressed store, hash-verified

150}
151
152func Int32PtrFromEnvOrFile(envVarName string, filePath string, v *Int32PtrValidation) (*int32, error) {
153 valStr := ReadEnvVar(envVarName)
154 if valStr != nil && *valStr != "" {
155 return Int32PtrFromEnv(envVarName, v)
156 }
157 return Int32PtrFromFile(filePath, v)
158}
159
160func Int32PtrFromPrompt(promptOpts *prompt.Options, v *Int32PtrValidation) (*int32, error) {
161 if v.Default != nil && promptOpts.DefaultStr == "" {

Callers

nothing calls this directly

Calls 3

ReadEnvVarFunction · 0.85
Int32PtrFromEnvFunction · 0.85
Int32PtrFromFileFunction · 0.85

Tested by

no test coverage detected