Bring code into line with Golangci-lint linters

- Error strings are no longer capitalized nor end with punctuation
- Alias import
- Remove extraneous initilisation code (No need to provide zero value
	for variables, because the compiler does that anyway)
This commit is contained in:
Shane Howearth 2019-09-18 16:23:30 +10:00 committed by Cecylia Bocovich
parent b26c7a7a73
commit 8bbdb3b51a
6 changed files with 11 additions and 11 deletions

View file

@ -19,7 +19,7 @@ import (
"syscall"
"time"
"git.torproject.org/pluggable-transports/goptlib.git"
pt "git.torproject.org/pluggable-transports/goptlib.git"
"git.torproject.org/pluggable-transports/snowflake.git/common/safelog"
"git.torproject.org/pluggable-transports/websocket.git/websocket"
"golang.org/x/crypto/acme/autocert"
@ -390,7 +390,7 @@ func main() {
}
pt.SmethodsDone()
var numHandlers int = 0
var numHandlers int
var sig os.Signal
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGTERM)

View file

@ -27,9 +27,9 @@ func statsThread() {
select {
case v := <-statsChannel:
if v {
numClientIP += 1
numClientIP++
}
numConnections += 1
numConnections++
case <-deadline:
now := time.Now()
log.Printf("in the past %.f s, %d/%d connections had client_ip",