mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
remove unused var and added copy comment
This commit is contained in:
5
management/server/store/cache/memory.go
vendored
5
management/server/store/cache/memory.go
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
5
management/server/store/cache/redis.go
vendored
5
management/server/store/cache/redis.go
vendored
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user