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

Function ErrorCannotBeNull

pkg/lib/configreader/errors.go:368–377  ·  view source on GitHub ↗
(isRequired bool)

Source from the content-addressed store, hash-verified

366}
367
368func ErrorCannotBeNull(isRequired bool) error {
369 msg := "cannot be null"
370 if !isRequired {
371 msg = "cannot be null (specify a value, or remove the key to use the default value)"
372 }
373 return errors.WithStack(&errors.Error{
374 Kind: ErrCannotBeNull,
375 Message: msg,
376 })
377}
378
379func ErrorCannotBeEmptyOrNull(isRequired bool) error {
380 msg := "cannot be empty or null"

Callers 15

BoolFunction · 0.85
Int64Function · 0.85
Float64Function · 0.85
IntFunction · 0.85
ValidateInt32PtrProvidedFunction · 0.85
ValidateIntPtrProvidedFunction · 0.85

Calls 1

WithStackFunction · 0.92

Tested by

no test coverage detected