diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-08-25 09:50:43 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-08-25 09:50:43 -0700 |
commit | c327833314fafd4accb9bbfbaf01f0dbee7a9a10 (patch) | |
tree | 4fc2c5bf05270b90c7b64c4ab313e7e586e5e68b /http | |
parent | 4148d8af80ba97b176568c2ac52ffce3721ddde0 (diff) |
Simplify context keys
Diffstat (limited to 'http')
-rw-r--r-- | http/context/context.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/http/context/context.go b/http/context/context.go index 1c65e64..7a434b5 100644 --- a/http/context/context.go +++ b/http/context/context.go @@ -92,7 +92,7 @@ func (c *Context) PocketRequestToken() string { return c.getContextStringValue(middleware.PocketRequestTokenContextKey) } -func (c *Context) getContextStringValue(key *middleware.ContextKey) string { +func (c *Context) getContextStringValue(key middleware.ContextKey) string { if v := c.request.Context().Value(key); v != nil { return v.(string) } @@ -100,7 +100,7 @@ func (c *Context) getContextStringValue(key *middleware.ContextKey) string { return "" } -func (c *Context) getContextBoolValue(key *middleware.ContextKey) bool { +func (c *Context) getContextBoolValue(key middleware.ContextKey) bool { if v := c.request.Context().Value(key); v != nil { return v.(bool) } @@ -108,7 +108,7 @@ func (c *Context) getContextBoolValue(key *middleware.ContextKey) bool { return false } -func (c *Context) getContextIntValue(key *middleware.ContextKey) int64 { +func (c *Context) getContextIntValue(key middleware.ContextKey) int64 { if v := c.request.Context().Value(key); v != nil { return v.(int64) } |