contextKey is a value for use with context.WithValue. It's used as a pointer so it fits in an interface{} without allocation. This technique for defining context keys was copied from Go 1.7's new use of context in net/http.
| 158 | // a pointer so it fits in an interface{} without allocation. This technique |
| 159 | // for defining context keys was copied from Go 1.7's new use of context in net/http. |
| 160 | type contextKey struct { |
| 161 | name string |
| 162 | } |
| 163 | |
| 164 | func (k *contextKey) String() string { |
| 165 | return "chi context value " + k.name |
nothing calls this directly
no outgoing calls
no test coverage detected