Skip to content

Commit

Permalink
Expand errors.New
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Mar 12, 2022
1 parent c4810f2 commit 50139d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/errors/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import (
"github.com/pkg/errors"
)

func New(message string) error {
func New(messages ...string) error {
var e Errors
e.Append(errors.New(message))
for _, message := range messages {
e.Append(errors.New(message))
}
return e.ErrorOrNil()
}

Expand Down

0 comments on commit 50139d3

Please sign in to comment.