aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.go b/main.go
index 498d22c..c155a1b 100644
--- a/main.go
+++ b/main.go
@@ -6,6 +6,8 @@ import (
"os"
"github.com/Necoro/feed2imap-go/internal/config"
+ "github.com/Necoro/feed2imap-go/internal/parse"
+ "github.com/Necoro/feed2imap-go/internal/util"
)
var cfgFile = flag.String("f", "config.yml", "configuration file")
@@ -15,17 +17,19 @@ func run() error {
flag.Parse()
log.Printf("Reading configuration file '%s'", *cfgFile)
- if _, err := config.Load(*cfgFile); err != nil {
+ cfg, err := config.Load(*cfgFile)
+ if err != nil {
return err
}
+ parse.Parse(cfg.Feeds)
+
return nil
}
func main() {
if err := run(); err != nil {
- log.SetOutput(os.Stderr)
- log.Print("Error: ", err)
+ util.Error(err)
os.Exit(1)
}
}