diff options
| author | horus | 2018-02-16 18:30:56 +0100 |
|---|---|---|
| committer | horus | 2018-02-16 18:30:56 +0100 |
| commit | 41d4487f8cbd6e6e3124079efcfb0cbc25f0ab0a (patch) | |
| tree | 34318457e69e3165c2df82cd421cd6123299948f /crawler/main.go | |
| parent | 6ff74852ebb70aa7cc24da89390e2607bac58369 (diff) | |
| download | alkobote-41d4487f8cbd6e6e3124079efcfb0cbc25f0ab0a.tar.gz | |
Log level is now configurable. (crawler)
Diffstat (limited to 'crawler/main.go')
| -rw-r--r-- | crawler/main.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/crawler/main.go b/crawler/main.go index 69f9638..8727443 100644 --- a/crawler/main.go +++ b/crawler/main.go @@ -2,7 +2,6 @@ package main import ( "encoding/json" - "flag" "fmt" "time" @@ -54,11 +53,11 @@ func main() { var err error - configFile := flag.String("config", "", "path to config file") - flag.Parse() - - app := App{Config: &Config{}} - app.Config.parseConfig(*configFile) + // copy global config to avoid woring with globals + _own_config := _conf + app := App{Config: &_own_config} + // overwrite the global + _conf = Config{} app.Now = time.Now().Unix() |
