diff --git a/README.md b/README.md index 6191e7b..9c5ca1b 100644 --- a/README.md +++ b/README.md @@ -698,7 +698,7 @@ By simply representing the error as a variable (`ErrItemNotFound`), we've ensure func GetItemHandler(w http.ReponseWriter, r http.Request) { item, err := clean.GetItem("123") if err != nil { - if err == clean.ErrItemNotFound { + if errors.Is(err, clean.ErrItemNotFound) { http.Error(w, err.Error(), http.StatusNotFound) return }