Replace incorrect use of fmt.Errorf (#3883)

This commit is contained in:
George Robinson 2024-06-20 12:02:05 +01:00 committed by GitHub
parent 730bd752d1
commit db32fab612
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -44,10 +44,10 @@ import (
)
// ErrNotFound is returned if a silence was not found.
var ErrNotFound = fmt.Errorf("silence not found")
var ErrNotFound = errors.New("silence not found")
// ErrInvalidState is returned if the state isn't valid.
var ErrInvalidState = fmt.Errorf("invalid state")
var ErrInvalidState = errors.New("invalid state")
type matcherCache map[*pb.Silence]labels.Matchers
@ -338,7 +338,7 @@ type Options struct {
func (o *Options) validate() error {
if o.SnapshotFile != "" && o.SnapshotReader != nil {
return fmt.Errorf("only one of SnapshotFile and SnapshotReader must be set")
return errors.New("only one of SnapshotFile and SnapshotReader must be set")
}
return nil
}