(provided interface{}, allowed interface{}, allowedVals ...interface{})
| 208 | } |
| 209 | |
| 210 | func ErrorInvalidInterface(provided interface{}, allowed interface{}, allowedVals ...interface{}) error { |
| 211 | allAllowedVals := append([]interface{}{allowed}, allowedVals...) |
| 212 | return errors.WithStack(&errors.Error{ |
| 213 | Kind: ErrInvalidInterface, |
| 214 | Message: fmt.Sprintf("invalid value (got %s, must be %s)", s.UserStr(provided), s.UserStrsOr(allAllowedVals)), |
| 215 | }) |
| 216 | } |
| 217 | |
| 218 | func ErrorInvalidFloat64(provided float64, allowed float64, allowedVals ...float64) error { |
| 219 | allAllowedVals := append([]float64{allowed}, allowedVals...) |
no test coverage detected