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