mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-21 06:20:31 +00:00
Fix linter error for strings in context.WithValue
This commit is contained in:
@@ -29,8 +29,13 @@ var (
|
||||
UniqueID = "0"
|
||||
)
|
||||
|
||||
// contextKey is a wrapper type for use in context.WithValue() to satisfy golint
|
||||
// https://github.com/golang/go/issues/17293
|
||||
// https://github.com/golang/lint/pull/245
|
||||
type contextKey string
|
||||
|
||||
// RequestCtxKey is key used for request entry in context
|
||||
const RequestCtxKey = "request"
|
||||
const RequestCtxKey contextKey = contextKey("request")
|
||||
|
||||
// CtxHandlerFunc is a http.HandlerFunc, with added contexts
|
||||
type CtxHandlerFunc func(context.Context, http.ResponseWriter, *http.Request)
|
||||
|
||||
Reference in New Issue
Block a user