Fix incorrect cherry-pick in previous commit.
This commit is contained in:
parent
2012e707d0
commit
45ae984f3b
4
app.go
4
app.go
|
@ -158,7 +158,7 @@ func main() {
|
||||||
go func() {
|
go func() {
|
||||||
refreshFiltersIfNeccessary(false)
|
refreshFiltersIfNeccessary(false)
|
||||||
// Save the updated config
|
// Save the updated config
|
||||||
err := writeConfig()
|
err := config.write()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the updated config
|
// Save the updated config
|
||||||
err := writeConfig()
|
err := config.write()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ func parseConfig() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Saves configuration to the YAML file and also saves the user filter contents to a file
|
// 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()
|
c.Lock()
|
||||||
defer c.Unlock()
|
defer c.Unlock()
|
||||||
configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
|
configFile := filepath.Join(config.ourBinaryDir, config.ourConfigFilename)
|
||||||
|
@ -217,7 +217,7 @@ func writeCoreDNSConfig() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeAllConfigs() error {
|
func writeAllConfigs() error {
|
||||||
err := writeConfig()
|
err := config.write()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Couldn't write our config: %s", err)
|
log.Printf("Couldn't write our config: %s", err)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue