golint: Replace a += 1 with a++

This commit is contained in:
Frank Schroeder 2017-04-20 12:00:03 -07:00 committed by Frank Schröder
parent 6688a510e1
commit 5a3961f31f
4 changed files with 4 additions and 4 deletions

View File

@ -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++
} }
} }

View File

@ -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)

View File

@ -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{

View File

@ -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