From 13008e0d969ab8643afc448ac7c66fe53f717bd4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 21 Feb 2022 11:11:27 +0100 Subject: [PATCH] go fmt --- auth/imap.go | 2 +- cmd/tokidoki/main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/imap.go b/auth/imap.go index 71fb1ae..c2681a9 100644 --- a/auth/imap.go +++ b/auth/imap.go @@ -25,7 +25,7 @@ func NewIMAP(addr string, tls bool) AuthProvider { } func (prov *IMAPProvider) Middleware() func(http.Handler) http.Handler { - return func (next http.Handler) http.Handler { + return func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { prov.doAuth(next, w, r) }) diff --git a/cmd/tokidoki/main.go b/cmd/tokidoki/main.go index 0d4de38..ea2ebb1 100644 --- a/cmd/tokidoki/main.go +++ b/cmd/tokidoki/main.go @@ -5,7 +5,7 @@ import ( "log" "net/http" "os" - + "github.com/go-chi/chi/v5" "github.com/go-chi/chi/v5/middleware" @@ -31,11 +31,11 @@ func main() { authProvider := auth.NewIMAP("imap.migadu.com:993", true) mux.Use(authProvider.Middleware()) - mux.Get("/", func (w http.ResponseWriter, r *http.Request) { + mux.Get("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello world!\n")) }) - server := http.Server { + server := http.Server{ Addr: addr, Handler: mux, }