tiny refactor: make function & const name more meaningful
This commit is contained in:
1 parent
91044ac0fa
commit
0109bf0ac7
1 file changed
+4
-4
+4
-4
@@ -47,10 +47,10 @@ type dnsConfig struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
versionCheckPeriod = 6 * time.Hour
|
updateCheckPeriod = 6 * time.Hour
|
||||||
)
|
)
|
||||||
|
|
||||||
func check() {
|
func checkForUpdates() {
|
||||||
handleResponse := func(r *checkpoint.CheckResponse, err error) {
|
handleResponse := func(r *checkpoint.CheckResponse, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Log.Printf("Error checking version: %v", err)
|
Log.Printf("Error checking version: %v", err)
|
||||||
@@ -68,7 +68,7 @@ func check() {
|
|||||||
}
|
}
|
||||||
resp, err := checkpoint.Check(¶ms)
|
resp, err := checkpoint.Check(¶ms)
|
||||||
handleResponse(resp, err)
|
handleResponse(resp, err)
|
||||||
checkpoint.CheckInterval(¶ms, versionCheckPeriod, handleResponse)
|
checkpoint.CheckInterval(¶ms, updateCheckPeriod, handleResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c ipamConfig) Enabled() bool {
|
func (c ipamConfig) Enabled() bool {
|
||||||
@@ -183,7 +183,7 @@ func main() {
|
|||||||
|
|
||||||
Log.Println("Command line options:", options())
|
Log.Println("Command line options:", options())
|
||||||
|
|
||||||
go check()
|
go checkForUpdates()
|
||||||
|
|
||||||
if prof != "" {
|
if prof != "" {
|
||||||
p := *profile.CPUProfile
|
p := *profile.CPUProfile
|
||||||
|
|||||||
Reference in new issue
Block a user