Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
chore: add New func to errors package
Browse files Browse the repository at this point in the history
  • Loading branch information
dtomasi committed Sep 3, 2021
1 parent 0897e7d commit 52520a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/errors/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ func NewStringerErr(s fmt.Stringer) error {

// NewErrf creates a new error from a format string and arguments.
func NewErrf(format string, args ...interface{}) error {
return fmt.Errorf(format, args...) //nolint
return fmt.Errorf(format, args...) // nolint:goerr113
}

// New returns a new error from go builtin errors package.
func New(msg string) error {
return errors.New(msg) // nolint:goerr113
}

0 comments on commit 52520a6

Please # to comment.