Skip to content

Commit 4d8cef7

Browse files
authored
Merge pull request #116 from mgerasimchuk/patch-1
Replace fmt.Errorf with errors.New for joined error list
2 parents a734c78 + fb7c8a8 commit 4d8cef7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/fallback

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import (
2+
"errors"
23
"fmt"
34
"strings"
45
"time"
@@ -76,7 +77,7 @@ func New{{$decorator}}(interval time.Duration, impls ...{{.Interface.Type}}) {{$
7677
_next <- struct{}{}
7778
_errorsList = append(_errorsList, _res.err.Error())
7879
if len(_errorsList) == len(_d.implementations) {
79-
err = fmt.Errorf(strings.Join(_errorsList, ";"))
80+
err = errors.New(strings.Join(_errorsList, ";"))
8081
return
8182
}
8283
{{else}}

0 commit comments

Comments
 (0)