Skip to content

Commit

Permalink
Fix function name
Browse files Browse the repository at this point in the history
  • Loading branch information
kazukousen committed Jan 9, 2024
1 parent 88cf9b3 commit 38392b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pperr.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ func Fprint(w io.Writer, err error) {
}

func FprintFunc(w io.Writer, err error, puts Printer) {
for _, e := range extractErrorSet(err, nil) {
for _, e := range extractErrorSets(err, nil) {
puts(w, e.Error, e.Frames, e.Parent)
}
}

func ExtractErrorSet(err error) []ErrorSet {
return extractErrorSet(err, nil)
func ExtractErrorSets(err error) ErrorSets {
return extractErrorSets(err, nil)
}

func extractErrorSet(err error, parent Frames) []ErrorSet {
func extractErrorSets(err error, parent Frames) []ErrorSet {
if err == nil {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pperr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestExtractErrorSet(t *testing.T) {
err := f1(true)

var buf strings.Builder
for _, e := range pperr.ExtractErrorSet(err) {
for _, e := range pperr.ExtractErrorSets(err) {
pperr.DefaultPrinter(&buf, e.Error, e.Frames, e.Parent)
}
actual := buf.String()
Expand Down

0 comments on commit 38392b9

Please sign in to comment.