We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4989efd + 6edd569 commit f5bff13Copy full SHA for f5bff13
internal/app/client.go
@@ -40,12 +40,12 @@ func (c *PostgreSQLClientImpl) Connect(connectionString string) error {
40
41
// Close closes the database connection.
42
func (c *PostgreSQLClientImpl) Close() error {
43
- if c.db != nil {
44
- if err := c.db.Close(); err != nil {
45
- return fmt.Errorf("failed to close database: %w", err)
46
- }
+ if c.db == nil {
47
return nil
48
}
+ if err := c.db.Close(); err != nil {
+ return fmt.Errorf("failed to close database: %w", err)
+ }
49
50
51
0 commit comments