Use new rule config + tidy ups

This commit is contained in:
Thom Seddon
2019-04-17 11:29:35 +01:00
parent e057f2d63a
commit 5597b7268b
4 changed files with 242 additions and 78 deletions

View File

@ -14,8 +14,8 @@ func main() {
// Setup logger
log := internal.NewDefaultLogger()
// Perform config checks
config.Checks()
// Perform config validation
config.Validate()
// Build server
server := internal.NewServer()
@ -24,7 +24,7 @@ func main() {
http.HandleFunc("/", server.RootHandler)
// Start
log.Debugf("Starting with options: %s", config.Serialise())
log.Debugf("Starting with options: %s", config)
log.Info("Listening on :4181")
log.Info(http.ListenAndServe(":4181", nil))
}