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

Function Int32FromPrompt

pkg/lib/configreader/int32.go:153–160  ·  view source on GitHub ↗
(promptOpts *prompt.Options, v *Int32Validation)

Source from the content-addressed store, hash-verified

151}
152
153func Int32FromPrompt(promptOpts *prompt.Options, v *Int32Validation) (int32, error) {
154 promptOpts.DefaultStr = s.Int32(v.Default)
155 valStr := prompt.Prompt(promptOpts)
156 if valStr == "" {
157 return ValidateInt32Missing(v)
158 }
159 return Int32FromStr(valStr, v)
160}
161
162func ValidateInt32Missing(v *Int32Validation) (int32, error) {
163 if v.Required {

Callers 1

ReadPromptFunction · 0.85

Calls 3

PromptFunction · 0.92
ValidateInt32MissingFunction · 0.85
Int32FromStrFunction · 0.85

Tested by

no test coverage detected