From 31f77af534a0e584480d31dcdc0d8ae763ded29a Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Wed, 28 Nov 2018 20:15:32 +0300 Subject: [PATCH] Move user filter saving into writeAllConfigs() --- config.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/config.go b/config.go index bec31db2..38bee5ed 100644 --- a/config.go +++ b/config.go @@ -146,6 +146,16 @@ func (c *configuration) write() error { return err } + return nil +} + +func writeAllConfigs() error { + err := config.write() + if err != nil { + log.Printf("Couldn't write config: %s", err) + return err + } + userFilter := userFilter() err = userFilter.save() if err != nil { @@ -155,8 +165,3 @@ func (c *configuration) write() error { return nil } - -func writeAllConfigs() error { - return config.write() -} -