Merge pull request #730 from gaal/go

Go: Fix a logic error in an example.
This commit is contained in:
Gaal Yahas 2022-11-17 21:57:32 +02:00 committed by GitHub
commit 2d5b76e3f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3371,7 +3371,7 @@ some other error, then consider using `cmp` with [`cmpopts.EquateErrors`].
> >
> ```go > ```go
> // Good: > // Good:
> gotErr := f(test.input) == nil > gotErr := f(test.input) != nil
> if gotErr != test.wantErr { > if gotErr != test.wantErr {
> t.Errorf("f(%q) returned err = %v, want error presence = %v", test.input, gotErr, test.wantErr) > t.Errorf("f(%q) returned err = %v, want error presence = %v", test.input, gotErr, test.wantErr)
> } > }