MCPcopy Index your code
hub / github.com/commitdev/zero / SpecificValueValidation

Function SpecificValueValidation

internal/init/prompts.go:63–72  ·  view source on GitHub ↗

SpecificValueValidation is a validation function that checks if the value is in the list of options

(values ...string)

Source from the content-addressed store, hash-verified

61
62// SpecificValueValidation is a validation function that checks if the value is in the list of options
63func SpecificValueValidation(values ...string) func(string) error {
64 return func(checkValue string) error {
65 for _, allowedValue := range values {
66 if checkValue == allowedValue {
67 return nil
68 }
69 }
70 return fmt.Errorf("Please choose one of %s", strings.Join(values, "/"))
71 }
72}
73
74// ValidateAKID checks if the input is a valid AWS Access Key ID
75func ValidateAKID(input string) error {

Callers 1

getProjectPromptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected