mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-04 04:21:57 +00:00
chore(gosec): enable gosec and address findings
This commit is contained in:
@@ -55,7 +55,7 @@ func (p *PostgresProvider) Connect(ctx context.Context, cfg ConnectionConfig) er
|
||||
select {
|
||||
case <-time.After(delay):
|
||||
case <-ctx.Done():
|
||||
db.Close()
|
||||
db.Close() //nolint:gosec // G104: best-effort call, error intentionally ignored
|
||||
return ctx.Err()
|
||||
}
|
||||
}
|
||||
@@ -78,7 +78,7 @@ func (p *PostgresProvider) Connect(ctx context.Context, cfg ConnectionConfig) er
|
||||
}
|
||||
|
||||
if !connected {
|
||||
db.Close()
|
||||
db.Close() //nolint:gosec // G104: best-effort call, error intentionally ignored
|
||||
return fmt.Errorf("failed to connect after %d attempts: %w", retryAttempts, lastErr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user