Fix gosec, govet, and errorlint linter errors
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -39,8 +39,8 @@ type Barrier interface {
|
||||
// AESGCMBarrier implements Barrier using AES-256-GCM encryption.
|
||||
type AESGCMBarrier struct {
|
||||
db *sql.DB
|
||||
mek []byte
|
||||
mu sync.RWMutex
|
||||
mek []byte // nil when sealed
|
||||
}
|
||||
|
||||
// NewAESGCMBarrier creates a new AES-GCM barrier backed by the given database.
|
||||
@@ -151,7 +151,7 @@ func (b *AESGCMBarrier) List(ctx context.Context, prefix string) ([]string, erro
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("barrier: list %q: %w", prefix, err)
|
||||
}
|
||||
defer rows.Close()
|
||||
defer func() { _ = rows.Close() }()
|
||||
|
||||
var paths []string
|
||||
for rows.Next() {
|
||||
|
||||
Reference in New Issue
Block a user