From aab9ec413eb707ef9f10ef1ee1c320432d5e1e5d Mon Sep 17 00:00:00 2001 From: Travis Groth Date: Fri, 31 Jul 2020 00:00:06 -0400 Subject: [PATCH] fix lint errors (#1171) --- config/helpers.go | 6 ++---- pkg/storage/redis/redis.go | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/helpers.go b/config/helpers.go index fb6001cec..3bfa11a8f 100644 --- a/config/helpers.go +++ b/config/helpers.go @@ -11,11 +11,9 @@ const ( ServiceAuthenticate = "authenticate" // ServiceCache represents running the cache service component ServiceCache = "cache" - - // RedisName is the name of the redis storage backend + // StorageRedisName is the name of the redis storage backend StorageRedisName = "redis" - - // InMemoryName is the name of the in-memory storage backend + // StorageInMemoryName is the name of the in-memory storage backend StorageInMemoryName = "memory" ) diff --git a/pkg/storage/redis/redis.go b/pkg/storage/redis/redis.go index a5d4c2337..979ea0a40 100644 --- a/pkg/storage/redis/redis.go +++ b/pkg/storage/redis/redis.go @@ -209,7 +209,9 @@ func (db *DB) ClearDeleted(ctx context.Context, cutoff time.Time) { _, span := trace.StartSpan(ctx, "databroker.redis.ClearDeleted") defer span.End() var opErr error - defer recordOperation(ctx, time.Now(), "clear_deleted", opErr) + defer func(startTime time.Time) { + recordOperation(ctx, startTime, "clear_deleted", opErr) + }(time.Now()) defer c.Close() ids, _ := redis.Strings(c.Do("SMEMBERS", db.deletedSet))