From 15c7fa01982e64af9e9939a65f23f7a50c26ee99 Mon Sep 17 00:00:00 2001 From: Gaal Yahas Date: Thu, 17 Nov 2022 19:03:10 +0000 Subject: [PATCH] Fix a logic error in an example. PiperOrigin-RevId: 489255983 --- go/decisions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/decisions.md b/go/decisions.md index 344e96b..c2d8858 100644 --- a/go/decisions.md +++ b/go/decisions.md @@ -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) > }