Skip to content

Commit

Permalink
lint: Fix redefines-builtin-id
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jul 13, 2024
1 parent eaaf327 commit c59c29c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions adapter/mysql/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ func withDatabase(callback func(*Adapter)) {
config.User = os.Getenv("MYSQL_USER")
config.Passwd = os.Getenv("MYSQL_PASSWORD")
config.DBName = os.Getenv("MYSQL_DATABASE")
adapter, close, err := NewAdapter(config)
adapter, closeDatabase, err := NewAdapter(config)

if err != nil {
panic(err)
}

defer close() //nolint:errcheck
defer closeDatabase() //nolint:errcheck

adapter.db.MustExec("DROP TABLE IF EXISTS followers;")
adapter.db.MustExec("DROP TABLE IF EXISTS articles;")
Expand Down
4 changes: 2 additions & 2 deletions adapter/oracle/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func withDatabase(callback func(*Adapter)) {
config.Username = os.Getenv("ORACLE_USER")
config.Password = os.Getenv("ORACLE_PASSWORD")
config.ServiceName = os.Getenv("ORACLE_SERVICE")
adapter, close, err := NewAdapter(config)
adapter, closeDatabase, err := NewAdapter(config)

if err != nil {
panic(err)
}

defer close() //nolint:errcheck
defer closeDatabase() //nolint:errcheck

// adapter.db.MustExec("DROP TABLE followers")
// adapter.db.MustExec("DROP TABLE articles")
Expand Down
4 changes: 2 additions & 2 deletions adapter/postgresql/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func withDatabase(callback func(*Adapter)) {
config.User = os.Getenv("POSTGRES_USER")
config.Password = os.Getenv("POSTGRES_PASSWORD")
config.DBName = os.Getenv("POSTGRES_DATABASE")
adapter, close, err := NewAdapter(config)
adapter, closeDatabase, err := NewAdapter(config)

if err != nil {
panic(err)
}

defer close() //nolint:errcheck
defer closeDatabase() //nolint:errcheck

adapter.db.MustExec("DROP TABLE IF EXISTS followers;")
adapter.db.MustExec("DROP TABLE IF EXISTS articles;")
Expand Down
4 changes: 2 additions & 2 deletions adapter/sqlite3/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
)

func withDatabase(callback func(*Adapter)) {
adapter, close, err := NewAdapter("file::memory:?cache=shared")
adapter, closeDatabase, err := NewAdapter("file::memory:?cache=shared")

if err != nil {
panic(err)
}

defer close() //nolint:errcheck
defer closeDatabase() //nolint:errcheck

adapter.DB.MustExec("PRAGMA foreign_keys = ON;")

Expand Down

0 comments on commit c59c29c

Please sign in to comment.