Skip to content

Commit

Permalink
ref: use any as the key type WithValue
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanialr committed Sep 10, 2024
1 parent 3ea5ee9 commit 16c5bbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ func (c *Context) Response() http.ContextResponse {
return NewContextResponse(c.instance, &ResponseOrigin{Ctx: c.instance})
}

func (c *Context) WithValue(key string, value any) {
ctx := context.WithValue(c.instance.UserContext(), ctxKey(key), value)
func (c *Context) WithValue(key any, value any) {
ctx := context.WithValue(c.instance.UserContext(), key, value)
c.instance.SetUserContext(ctx)
}

Expand Down

0 comments on commit 16c5bbf

Please sign in to comment.