diff --git a/cmd/serve.go b/cmd/serve.go index 0096e748..446cbc1f 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -17,7 +17,7 @@ import ( "github.com/FreifunkBremen/yanic/webserver" ) -// Config represents the whole configuration +// ServeConfig represents the whole configuration type ServeConfig struct { Respondd respond.Config Webserver webserver.Config diff --git a/main.go b/main.go index 6e63ad24..86e67187 100644 --- a/main.go +++ b/main.go @@ -9,9 +9,9 @@ import ( "github.com/FreifunkBremen/yanic/cmd" ) -type Hook struct{} +type hook struct{} -func (hook *Hook) Fire(entry *log.Entry) error { +func (h *hook) Fire(entry *log.Entry) error { switch entry.Level { case log.PanicLevel: entry.Logger.Out = os.Stderr @@ -31,12 +31,12 @@ func (hook *Hook) Fire(entry *log.Entry) error { return nil } -func (hook *Hook) Levels() []stdLogger.Level { +func (h *hook) Levels() []stdLogger.Level { return log.AllLevels } func main() { - log.AddHook(&Hook{}) + log.AddHook(&hook{}) cmd.Execute() }