mirror of
https://git.sr.ht/~sircmpwn/tokidoki
synced 2025-12-12 14:17:21 +01:00
go fmt
This commit is contained in:
parent
5a641ceca1
commit
13008e0d96
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue