Skip to content

Commit bc840ee

Browse files
committed
replace += 1 with ++ to pass golint
1 parent 2d5ce45 commit bc840ee

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

benchmark_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestBenchmark(t *testing.T) {
3535
go func() {
3636
counter := 0
3737
for record := range benchmark.collector {
38-
counter += 1
38+
counter++
3939
if counter == requests || record.Error != nil {
4040
break
4141
}

monitor.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,24 +92,24 @@ loop:
9292
}
9393

9494
func updateStats(stats *Stats, record *Record) {
95-
stats.totalRequests += 1
95+
stats.totalRequests++
9696

9797
if record.Error != nil {
98-
stats.totalFailedReqeusts += 1
98+
stats.totalFailedReqeusts++
9999

100100
switch record.Error.(type) {
101101
case *ConnectError:
102-
stats.errConnect += 1
102+
stats.errConnect++
103103
case *ExceptionError:
104-
stats.errException += 1
104+
stats.errException++
105105
case *LengthError:
106-
stats.errLength += 1
106+
stats.errLength++
107107
case *ReceiveError:
108-
stats.errReceive += 1
108+
stats.errReceive++
109109
case *ResponseError:
110-
stats.errResponse += 1
110+
stats.errResponse++
111111
default:
112-
stats.errException += 1
112+
stats.errException++
113113
}
114114

115115
} else {

0 commit comments

Comments
 (0)