From bf8da4a08a99059f2e06da811be9cb08f0cf0a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Soul=C3=A9?= Date: Fri, 9 Sep 2016 11:37:22 +0200 Subject: [PATCH] Context.Get() does not need to test whether Keys is nil or not --- context.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/context.go b/context.go index 5d3b6a4e..50161750 100644 --- a/context.go +++ b/context.go @@ -166,9 +166,7 @@ func (c *Context) Set(key string, value interface{}) { // Get returns the value for the given key, ie: (value, true). // If the value does not exists it returns (nil, false) func (c *Context) Get(key string) (value interface{}, exists bool) { - if c.Keys != nil { - value, exists = c.Keys[key] - } + value, exists = c.Keys[key] return }