summaryrefslogtreecommitdiff
path: root/error.go
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-09-17 01:19:25 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-09-17 01:19:25 +0300
commita054f480adf26e90ddcb66408688486704ab7094 (patch)
tree4600b6e7633979e1a4b94cfcaeb7ddf156733575 /error.go
parent5094ebf213243023c6325310b3f710a0974025dd (diff)
simple handlerv0.0.2
Diffstat (limited to 'error.go')
-rw-r--r--error.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/error.go b/error.go
index 416d578..f85174e 100644
--- a/error.go
+++ b/error.go
@@ -3,11 +3,11 @@ package mux
import (
"context"
"encoding/json"
- "io"
+ "net/http"
)
var DefaultErrorHandler func(err error) Renderer = func(err error) Renderer {
- return RendererFunc(func(ctx context.Context, w io.Writer) error {
+ return RendererFunc(func(ctx context.Context, w http.ResponseWriter) error {
return json.NewEncoder(w).Encode(errorStruct{
Message: err.Error(),
})