remove unused var and added copy comment

This commit is contained in:
Pascal Fischer
2025-10-13 16:45:17 +02:00
parent f0e8cd578d
commit 488afe4082
3 changed files with 10 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
/*
Example code copied from https://github.com/go-gorm/caches
*/
package cache
import (
@@ -21,6 +25,7 @@ func (c *MemoryCacher) Get(ctx context.Context, key string, q *caches.Query[any]
c.init()
val, ok := c.store.Load(key)
if !ok {
//nolint
return nil, nil
}

View File

@@ -1,3 +1,7 @@
/*
Example code copied from https://github.com/go-gorm/caches
*/
package cache
import (
@@ -20,6 +24,7 @@ func NewRedisCacher(rdb *redis.Client) *RedisCacher {
func (c *RedisCacher) Get(ctx context.Context, key string, q *caches.Query[any]) (*caches.Query[any], error) {
res, err := c.rdb.Get(ctx, key).Result()
if err == redis.Nil {
//nolint
return nil, nil
}

View File

@@ -57,7 +57,6 @@ const (
// SqlStore represents an account storage backed by a Sql DB persisted to disk
type SqlStore struct {
db *gorm.DB
uncachedDB *gorm.DB
globalAccountLock sync.Mutex
metrics telemetry.AppMetrics
installationPK int