go tool vet rectification

This commit is contained in:
Mahak Mukhi
2016-11-18 14:23:08 -08:00
parent 058907d033
commit 45907c27fa

View File

@ -6,6 +6,7 @@ import (
"time" "time"
) )
// Params is used to set keepalive parameters.
type Params struct { type Params struct {
// After a duration of this time the client pings the server to see if the transport is still alive. // After a duration of this time the client pings the server to see if the transport is still alive.
Ktime time.Duration Ktime time.Duration
@ -15,13 +16,15 @@ type Params struct {
KNoStream bool KNoStream bool
} }
var DefaultKParams Params = Params{ // DefaultKParams contains default values for keepalive parameters
var DefaultKParams = Params{
Ktime: time.Duration(math.MaxInt64), // default to infinite Ktime: time.Duration(math.MaxInt64), // default to infinite
Ktimeout: time.Duration(20 * 1000 * 1000 * 1000), // default to 20 seconds Ktimeout: time.Duration(20 * 1000 * 1000 * 1000), // default to 20 seconds
KNoStream: false, KNoStream: false,
} }
// Mutex to protect Enabled variable // MU is a mutex to protect Enabled variable
var Mu sync.Mutex = sync.Mutex{} var Mu = sync.Mutex{}
// Enabled is a knob used to turn keepalive on or off
var Enabled = false var Enabled = false