(isRequired bool)
| 366 | } |
| 367 | |
| 368 | func 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 | |
| 379 | func ErrorCannotBeEmptyOrNull(isRequired bool) error { |
| 380 | msg := "cannot be empty or null" |
no test coverage detected