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

Function ErrorInvalidInt32

pkg/lib/configreader/errors.go:242–248  ·  view source on GitHub ↗
(provided int32, allowed int32, allowedVals ...int32)

Source from the content-addressed store, hash-verified

240}
241
242func ErrorInvalidInt32(provided int32, allowed int32, allowedVals ...int32) error {
243 allAllowedVals := append([]int32{allowed}, allowedVals...)
244 return errors.WithStack(&errors.Error{
245 Kind: ErrInvalidInt32,
246 Message: fmt.Sprintf("invalid value (got %s, must be %s)", s.UserStr(provided), s.UserStrsOr(allAllowedVals)),
247 })
248}
249
250func ErrorInvalidInt(provided int, allowed int, allowedVals ...int) error {
251 allAllowedVals := append([]int{allowed}, allowedVals...)

Callers 1

ValidateInt32ValFunction · 0.85

Calls 2

WithStackFunction · 0.92
UserStrMethod · 0.45

Tested by

no test coverage detected