Skip to content

Commit 5efb898

Browse files
committed
martian/context: fix typo in context key
1 parent a104817 commit 5efb898

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/martian/context.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ type Session struct {
5151
vals map[string]any
5252
}
5353

54-
const marianKey string = "martian.Context"
54+
const martianKey string = "martian.Context"
5555

5656
// NewContext returns a context for the in-flight HTTP request.
5757
func NewContext(req *http.Request) *Context {
58-
v := req.Context().Value(marianKey)
58+
v := req.Context().Value(martianKey)
5959
if v == nil {
6060
return nil
6161
}
@@ -178,7 +178,7 @@ func (ctx *Context) addToContext(rctx context.Context) context.Context {
178178
if rctx == nil {
179179
rctx = context.Background()
180180
}
181-
return context.WithValue(rctx, marianKey, ctx)
181+
return context.WithValue(rctx, martianKey, ctx)
182182
}
183183

184184
// Session returns the session for the context.

0 commit comments

Comments
 (0)