Skip to content

Commit ac59006

Browse files
committed
chore(AIP-141) change variable name to wantErr.
Given that `err` is very commonly assigned as an `error`, it is better to use a different variable name, e.g. `wantErr`.
1 parent 2ed9a5d commit ac59006

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules/aip0141/count_suffix_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestCount(t *testing.T) {
2626
testName string
2727
FieldName string
2828
want string
29-
err bool
29+
wantErr bool
3030
}{
3131
{"Valid", "item_count", "item_count", false},
3232
{"NumItems", "num_items", "item_count", true},
@@ -43,7 +43,7 @@ func TestCount(t *testing.T) {
4343
`, test)
4444
field := file.GetMessageTypes()[0].GetFields()[0]
4545
wantProblems := testutils.Problems{}
46-
if test.err {
46+
if test.wantErr {
4747
wantProblems = append(wantProblems, lint.Problem{
4848
Message: "_count suffix",
4949
Suggestion: test.want,

0 commit comments

Comments
 (0)