a more stupid way of doing middle chaining, but at least it is clearer.

This commit is contained in:
fiatjaf
2024-09-26 09:56:42 -03:00
parent 60116e36fe
commit ed270747af
3 changed files with 18 additions and 12 deletions

View File

@@ -2,7 +2,7 @@ package main
import "net/http"
func loggingMiddleware(next http.Handler) http.Handler {
func loggingMiddleware(next http.HandlerFunc) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
if r.URL.RawQuery != "" {