cake-order-tracker/internal/logging/error.go
2025-03-28 18:12:00 +01:00

13 lines
218 B
Go

package logging
import (
"fmt"
"net/http"
)
func ErrorPage(err error, status int) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(status)
fmt.Fprint(w, err.Error())
}
}