From c2e0e8e80b5831996da38efbfaa4bb206875bf40 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 7 Sep 2025 19:14:20 -0500 Subject: start using a standard http PB --- middleware.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'middleware.go') 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) { -- cgit v1.2.3