summaryrefslogtreecommitdiff
path: root/middleware.go
diff options
context:
space:
mode:
Diffstat (limited to 'middleware.go')
-rw-r--r--middleware.go10
1 files changed, 2 insertions, 8 deletions
diff --git a/middleware.go b/middleware.go
index 803e162..10048cd 100644
--- a/middleware.go
+++ b/middleware.go
@@ -1,13 +1,8 @@
package main
-import (
- "bytes"
- "context"
- "io/ioutil"
- "log"
- "net/http"
-)
+// a middleware example. probably not interesting since we only pass protobufs
+/*
// Define a key type to avoid context key collisions.
type contextKey string
@@ -42,7 +37,6 @@ func bufferBodyMiddleware(next http.Handler) http.Handler {
})
}
-/*
// okHandler is the final handler. It can now safely access the body from the context,
// knowing that other middleware might have also read it.
func okHandler(w http.ResponseWriter, r *http.Request) {