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

Function validateInt

pkg/lib/configreader/int.go:176–186  ·  view source on GitHub ↗
(val int, v *IntValidation)

Source from the content-addressed store, hash-verified

174}
175
176func validateInt(val int, v *IntValidation) (int, error) {
177 err := ValidateIntVal(val, v)
178 if err != nil {
179 return 0, err
180 }
181
182 if v.Validator != nil {
183 return v.Validator(val)
184 }
185 return val, nil
186}
187
188func ValidateIntVal(val int, v *IntValidation) error {
189 if v.GreaterThan != nil {

Callers 2

ValidateIntMissingFunction · 0.85
ValidateIntProvidedFunction · 0.85

Calls 1

ValidateIntValFunction · 0.85

Tested by

no test coverage detected