mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
chore(go-lint): fix golint warning (#133)
Fixes several go lint cases reported by go report. Signed-off-by: wiwen <shenggxhz@gmail.com>
This commit is contained in:
parent
639ead416e
commit
f5ae3ff476
25 changed files with 78 additions and 51 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"github.com/openebs/zfs-localpv/pkg/common/env"
|
||||
)
|
||||
|
||||
// OpenEBSPingPeriod ping interval of volume io analytics
|
||||
var OpenEBSPingPeriod = "OPENEBS_IO_ANALYTICS_PING_INTERVAL"
|
||||
|
||||
const (
|
||||
|
|
@ -39,7 +40,7 @@ func PingCheck() {
|
|||
u := New()
|
||||
duration := getPingPeriod()
|
||||
ticker := time.NewTicker(duration)
|
||||
for _ = range ticker.C {
|
||||
for range ticker.C {
|
||||
u.Build().
|
||||
InstallBuilder(true).
|
||||
SetCategory(Ping).
|
||||
|
|
@ -57,7 +58,8 @@ func getPingPeriod() time.Duration {
|
|||
if duration < minimumPingPeriod {
|
||||
// Avoid corner case when the ENV value is undesirable
|
||||
return time.Duration(defaultPingPeriod)
|
||||
} else {
|
||||
return time.Duration(duration)
|
||||
}
|
||||
|
||||
return time.Duration(duration)
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue