Skip to content

Commit

Permalink
docs(readme): change ErrorKey{} to KeyError as it was replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
utilyre committed Mar 2, 2024
1 parent 919fa44 commit 5c9e689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
}

func handleError(w http.ResponseWriter, r *http.Request) {
err := r.Context().Value(xmate.ErrorKey{}).(error)
err := r.Context().Value(xmate.KeyError).(error)

if httpErr := new(xmate.HTTPError); errors.As(err, &httpErr) {
_ = xmate.WriteText(w, httpErr.Code, httpErr.Message)
Expand Down

0 comments on commit 5c9e689

Please sign in to comment.