mirror of https://github.com/status-im/consul.git
golint: Replace a += 1 with a++
This commit is contained in:
parent
6688a510e1
commit
5a3961f31f
|
@ -671,6 +671,6 @@ func (h *httpLogHandler) HandleLog(log string) {
|
||||||
default:
|
default:
|
||||||
// Just increment a counter for dropped logs to this handler; we can't log now
|
// Just increment a counter for dropped logs to this handler; we can't log now
|
||||||
// because the lock is already held by the LogWriter invoking this
|
// because the lock is already held by the LogWriter invoking this
|
||||||
h.droppedCount += 1
|
h.droppedCount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ func makeHTTPServerWithACLs(t *testing.T) (string, *HTTPServer) {
|
||||||
func makeHTTPServerWithConfigLog(t *testing.T, cb func(c *Config), l io.Writer, logWriter *logger.LogWriter) (string, *HTTPServer) {
|
func makeHTTPServerWithConfigLog(t *testing.T, cb func(c *Config), l io.Writer, logWriter *logger.LogWriter) (string, *HTTPServer) {
|
||||||
configTry := 0
|
configTry := 0
|
||||||
RECONF:
|
RECONF:
|
||||||
configTry += 1
|
configTry++
|
||||||
conf := nextConfig()
|
conf := nextConfig()
|
||||||
if cb != nil {
|
if cb != nil {
|
||||||
cb(conf)
|
cb(conf)
|
||||||
|
|
|
@ -136,7 +136,7 @@ func (s *HTTPServer) convertOps(resp http.ResponseWriter, req *http.Request) (st
|
||||||
|
|
||||||
verb := api.KVOp(in.KV.Verb)
|
verb := api.KVOp(in.KV.Verb)
|
||||||
if isWrite(verb) {
|
if isWrite(verb) {
|
||||||
writes += 1
|
writes++
|
||||||
}
|
}
|
||||||
|
|
||||||
out := &structs.TxnOp{
|
out := &structs.TxnOp{
|
||||||
|
|
|
@ -297,7 +297,7 @@ func TestClient_RPC_ConsulServerPing(t *testing.T) {
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Errorf("Unable to ping server %v: %s", s.String(), err)
|
t.Errorf("Unable to ping server %v: %s", s.String(), err)
|
||||||
}
|
}
|
||||||
pingCount += 1
|
pingCount++
|
||||||
|
|
||||||
// Artificially fail the server in order to rotate the server
|
// Artificially fail the server in order to rotate the server
|
||||||
// list
|
// list
|
||||||
|
|
Loading…
Reference in New Issue