From e66691083a2455c29b50a2970c0aba1d6afca753 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 23 Oct 2024 20:34:57 +0200 Subject: Switch to http.Handler The used `func(http.ResponseWriter, *http.Request)` return values made the HTTP handler factory functions quite unreadable. Thus it is switched to the http.Handler type. --- view/favicon.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'view/favicon.go') diff --git a/view/favicon.go b/view/favicon.go index 8e3ea79..67d7051 100644 --- a/view/favicon.go +++ b/view/favicon.go @@ -4,6 +4,10 @@ import ( "net/http" ) -func FaviconRead(w http.ResponseWriter, r *http.Request) { - w.WriteHeader(http.StatusNoContent) +func FaviconRead() http.Handler { + return http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusNoContent) + }, + ) } -- cgit v1.2.3-70-g09d2