From 0109bf0ac7541dd93ac39f5043f08d1bfe7a05d0 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sat, 26 Mar 2016 21:18:06 +0000 Subject: [PATCH] tiny refactor: make function & const name more meaningful --- prog/weaver/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/prog/weaver/main.go b/prog/weaver/main.go index 9bfe8c2a..de7fbec2 100644 --- a/prog/weaver/main.go +++ b/prog/weaver/main.go @@ -47,10 +47,10 @@ type dnsConfig struct { } const ( - versionCheckPeriod = 6 * time.Hour + updateCheckPeriod = 6 * time.Hour ) -func check() { +func checkForUpdates() { handleResponse := func(r *checkpoint.CheckResponse, err error) { if err != nil { Log.Printf("Error checking version: %v", err) @@ -68,7 +68,7 @@ func check() { } resp, err := checkpoint.Check(¶ms) handleResponse(resp, err) - checkpoint.CheckInterval(¶ms, versionCheckPeriod, handleResponse) + checkpoint.CheckInterval(¶ms, updateCheckPeriod, handleResponse) } func (c ipamConfig) Enabled() bool { @@ -183,7 +183,7 @@ func main() { Log.Println("Command line options:", options()) - go check() + go checkForUpdates() if prof != "" { p := *profile.CPUProfile