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D1=8C=D0=B7=D1=83=D0=B5=D1=82=D1=81=D1=8F=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=20=D0=BF=D0=BE-=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8E.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 9d91ceb..fde2f7c 100644 --- a/main.go +++ b/main.go @@ -40,10 +40,11 @@ func main() { log.Println("Flags processed") if options.ConfigPath == "" { - log.Fatalf("Config path not found in options!") + log.Println("Config path not found in options! Use default from /etc/ssender/config.yml") + } else { + log.Printf("Config from: %s\n", options.ConfigPath) + ConfigPath = options.ConfigPath } - log.Printf("Config from: %s\n", options.ConfigPath) - ConfigPath = options.ConfigPath // Get config cfg, err := config.NewConfig(ConfigPath) @@ -66,11 +67,12 @@ func main() { } } - //Find new items + // Find new items sendItems, err := db.FindItems(*rss, cfg.Dbpath) if err != nil { log.Fatal(err) } + log.Printf("Found %d new items to send\n", len(sendItems.ItemList)) if len(sendItems.ItemList) > 0 { // Run send data depended on configuration options