github.com/hellobchain/third_party@v0.0.0-20230331131523-deb0478a2e52/go-chi/chi/middleware/middleware.go (about) 1 package middleware 2 3 // contextKey is a value for use with context.WithValue. It's used as 4 // a pointer so it fits in an interface{} without allocation. This technique 5 // for defining context keys was copied from Go 1.7's new use of context in net/http. 6 type contextKey struct { 7 name string 8 } 9 10 func (k *contextKey) String() string { 11 return "chi/middleware context value " + k.name 12 }