fix(lint): resolve golangci-lint errors
- Fix errcheck: explicitly ignore tx.Rollback() error in defer - When transaction commits successfully, Rollback() returns an error (expected) - Use defer func() with explicit error assignment to satisfy linter - Remove unused connectToService function - Function is not currently used (proto files not yet generated) - Commented out with TODO for future implementation - Prevents unused function lint error
This commit is contained in:
@@ -97,7 +97,9 @@ func createSchemaIfNotExists(ctx context.Context, db *sql.DB, schemaName string)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer tx.Rollback()
|
||||
defer func() {
|
||||
_ = tx.Rollback() // Ignore error - if commit succeeded, rollback will error (expected)
|
||||
}()
|
||||
|
||||
// Check if schema exists
|
||||
var exists bool
|
||||
|
||||
Reference in New Issue
Block a user