This commit is contained in:
Samuel Berthe
2022-10-06 23:15:50 +02:00
parent 4247308f56
commit cce64116f4
2 changed files with 9 additions and 24 deletions

View File

@@ -10,7 +10,7 @@ import (
// Play: https://go.dev/play/p/vPyh51XpCBt
func Validate(ok bool, format string, args ...any) error {
if !ok {
return errors.New(fmt.Sprintf(format, args...))
return fmt.Errorf(fmt.Sprintf(format, args...))
}
return nil
}