From 45ae984f3bd7bad1f21c1e8f9910558cc2986cba Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Thu, 29 Nov 2018 14:56:56 +0300 Subject: [PATCH] Fix incorrect cherry-pick in previous commit. --- app.go | 4 ++-- config.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app.go b/app.go index b8fa54c4..85cb96ae 100644 --- a/app.go +++ b/app.go @@ -158,7 +158,7 @@ func main() { go func() { refreshFiltersIfNeccessary(false) // Save the updated config - err := writeConfig() + err := config.write() if err != nil { log.Fatal(err) } @@ -170,7 +170,7 @@ func main() { } // Save the updated config - err := writeConfig() + err := config.write() if err != nil { log.Fatal(err) } diff --git a/config.go b/config.go index f79923a4..3fead5a1 100644 --- a/config.go +++ b/config.go @@ -171,7 +171,7 @@ func parseConfig() error { } // Saves configuration to the YAML file and also saves the user filter contents to a file -func writeConfig() error { +func (c *configuration) write() error { c.Lock() defer c.Unlock() configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename) @@ -217,7 +217,7 @@ func writeCoreDNSConfig() error { } func writeAllConfigs() error { - err := writeConfig() + err := config.write() if err != nil { log.Printf("Couldn't write our config: %s", err) return err