Skip to content

Commit

Permalink
examples: make compatible with go1.18 to pass lint
Browse files Browse the repository at this point in the history
  • Loading branch information
brandondyck authored and shoenig committed Sep 10, 2024
1 parent 12dfe1d commit b308461
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func ExampleErrorIs() {
e1 := errors.New("e1")
e2 := errors.New("e2")
e3 := errors.New("e3")
errorChain := errors.Join(e1, e2, e3)
errorChain := fmt.Errorf("%w%w%w", e1, e2, e3)
ErrorIs(t, errorChain, e2)
// Output:
}
Expand All @@ -314,7 +314,7 @@ func ExampleErrorAs() {
e1 := errors.New("e1")
e2 := FakeError("foo")
e3 := errors.New("e3")
errorChain := errors.Join(e1, e2, e3)
errorChain := fmt.Errorf("%w%w%w", e1, e2, e3)
var target FakeError
ErrorAs(t, errorChain, &target)
fmt.Println(target.Error())
Expand Down
4 changes: 2 additions & 2 deletions must/examples_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b308461

Please sign in to comment.