mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Merge pull request #730 from gaal/go
Go: Fix a logic error in an example.
This commit is contained in:
commit
2d5b76e3f6
|
@ -3371,7 +3371,7 @@ some other error, then consider using `cmp` with [`cmpopts.EquateErrors`].
|
|||
>
|
||||
> ```go
|
||||
> // Good:
|
||||
> gotErr := f(test.input) == nil
|
||||
> gotErr := f(test.input) != nil
|
||||
> if gotErr != test.wantErr {
|
||||
> t.Errorf("f(%q) returned err = %v, want error presence = %v", test.input, gotErr, test.wantErr)
|
||||
> }
|
||||
|
|
Loading…
Reference in New Issue
Block a user