Remove unused code

This commit is contained in:
Taras Kushnir
2026-01-09 15:54:12 +02:00
parent 336353e551
commit f02b7fca9e
2 changed files with 0 additions and 22 deletions

View File

@@ -5,7 +5,6 @@ import (
"fmt"
"log/slog"
"os"
"strings"
)
const (
@@ -102,20 +101,6 @@ func SetupTraceLogs() {
slog.SetDefault(logger)
}
func FindHeader(headers map[string]string, header string) (string, bool) {
requestID, ok := headers[header]
if ok {
return requestID, ok
}
requestID, ok = headers[strings.ToLower(header)]
if ok {
return requestID, ok
}
return "", false
}
func ErrAttr(err error) slog.Attr {
return slog.Any("error", err)
}

View File

@@ -117,13 +117,6 @@ func Cached(next http.Handler) http.Handler {
})
}
func NoCache(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
WriteHeaders(w, NoCacheHeaders)
next.ServeHTTP(w, r)
})
}
func HttpStatus(code int) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(code)