Skip to content

Commit

Permalink
Make configuration file be read on startup
Browse files Browse the repository at this point in the history
(oops)
  • Loading branch information
abh committed Mar 5, 2013
1 parent c948995 commit a5a3f3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ type AppConfig struct {
}
}

var Config = new(AppConfig)

func configWatcher(fileName string) {

configReader(fileName)

watcher, err := fsnotify.NewWatcher()
if err != nil {
fmt.Println(err)
Expand Down
2 changes: 0 additions & 2 deletions geodns.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ var serverId string
var timeStarted = time.Now()
var qCounter = expvar.NewInt("qCounter")

var Config = new(AppConfig)

var (
flagconfig = flag.String("config", "./dns/", "directory of zone files")
flagcheckconfig = flag.Bool("checkconfig", false, "check configuration and exit")
Expand Down

0 comments on commit a5a3f3a

Please sign in to comment.