From f6758264b2448771d3d7a6b85937c13b57888e81 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 8 Jan 2020 10:38:33 +0100 Subject: Make New return the Server This will be useful to implement hot reload. --- cmd/koushin/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/koushin') diff --git a/cmd/koushin/main.go b/cmd/koushin/main.go index c9df12b..0f6c776 100644 --- a/cmd/koushin/main.go +++ b/cmd/koushin/main.go @@ -35,7 +35,8 @@ func main() { if l, ok := e.Logger.(*log.Logger); ok { l.SetHeader("${time_rfc3339} ${level}") } - if err := koushin.New(e, &options); err != nil { + _, err := koushin.New(e, &options) + if err != nil { e.Logger.Fatal(err) } e.Use(middleware.Recover()) -- cgit v1.2.3