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

Function ValidateStringListProvided

pkg/lib/configreader/string_list.go:82–91  ·  view source on GitHub ↗
(val []string, v *StringListValidation)

Source from the content-addressed store, hash-verified

80}
81
82func ValidateStringListProvided(val []string, v *StringListValidation) ([]string, error) {
83 if v.CantBeSpecifiedErrStr != nil {
84 return nil, ErrorFieldCantBeSpecified(*v.CantBeSpecifiedErrStr)
85 }
86
87 if !v.AllowExplicitNull && val == nil {
88 return nil, ErrorCannotBeNull(v.Required)
89 }
90 return validateStringList(val, v)
91}
92
93func validateStringList(val []string, v *StringListValidation) ([]string, error) {
94 if v.RequireCortexResources {

Callers 1

StringListFunction · 0.85

Calls 3

ErrorCannotBeNullFunction · 0.85
validateStringListFunction · 0.85

Tested by

no test coverage detected