We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df7e229 commit 556474eCopy full SHA for 556474e
README.md
@@ -64,7 +64,7 @@ func addProduct(w http.ResponseWriter, r *http.Request) error {
64
chain := errhandler.Chain(midLog1, midLog2)
65
66
mux := http.NewServeMux()
67
-mux.Handle("GET /products", errhandler.Wrap(chain(getProducts)))
+mux.Handle("GET /products/{id}", errhandler.Wrap(chain(getProducts)))
68
69
func midLog1(n errhandler.Wrap) errhandler.Wrap {
70
return func(w http.ResponseWriter, r *http.Request) error {
@@ -79,4 +79,8 @@ func midLog2(n errhandler.Wrap) errhandler.Wrap {
79
return n(w, r)
80
}
81
82
+
83
+func addProduct(w http.ResponseWriter, r *http.Request) error {
84
+ ...
85
+}
86
```
0 commit comments