From 93628b37bdd639934e302d4317b6b5656aa7b722 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 19 Feb 2016 01:08:38 +0100 Subject: Initial functionality --- main.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 2bb53ba..b517c49 100644 --- a/main.go +++ b/main.go @@ -1,11 +1,21 @@ package main -import "log" +import ( + "flag" + "log" +) + +var conf = flag.String("conf", "config.yml", "configuration file") func main() { - c, err := LoadConfig("config.yml") + c, err := LoadConfig(*conf) if err != nil { log.Fatal(err) } - log.Printf("%+v\n", c) + for _, uri := range c.Check { + err := Check(uri) + if err != nil { + log.Println(uri, err) + } + } } -- cgit v1.2.3