fix(lint): resolve golangci-lint errors
Some checks failed
CI / Test (pull_request) Failing after 22s
CI / Lint (pull_request) Failing after 19s
CI / Build (pull_request) Failing after 6s
CI / Format Check (pull_request) Successful in 2s

- 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:
2025-11-06 10:28:48 +01:00
parent cd57fe7c14
commit 767654f257
2 changed files with 27 additions and 24 deletions

View File

@@ -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