Remove err from parameters

This commit is contained in:
Peter Stuifzand 2018-09-15 16:08:04 +02:00
parent ab8998cdf2
commit e3daa14614
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -43,7 +43,7 @@ func (b *memoryBackend) cachedCheckAuthToken(conn redis.Conn, header string, r *
var err error
areweauth, err := getCachedValue(err, conn, key, r)
areweauth, err := getCachedValue(conn, key, r)
if areweauth {
return true
}
@ -76,7 +76,8 @@ func setCachedTokenResponseValue(err error, conn redis.Conn, key string, r *auth
}
}
func getCachedValue(err error, conn redis.Conn, key string, r *auth.TokenResponse) (bool, error) {
// getCachedValue gets the cached value from Redis
func getCachedValue(conn redis.Conn, key string, r *auth.TokenResponse) (bool, error) {
values, err := redis.Values(conn.Do("HGETALL", key))
if err == nil && len(values) > 0 {
if err = redis.ScanStruct(values, r); err == nil {