Commit 38b6c3af authored by Johnny's avatar Johnny

chore: fix linter

parent 3fd29f64
...@@ -50,7 +50,7 @@ func (d *DB) Close() error { ...@@ -50,7 +50,7 @@ func (d *DB) Close() error {
func (d *DB) IsInitialized(ctx context.Context) (bool, error) { func (d *DB) IsInitialized(ctx context.Context) (bool, error) {
var exists bool var exists bool
err := d.db.QueryRow("SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE TABLE_NAME = 'memo' AND TABLE_TYPE = 'BASE TABLE')").Scan(&exists) err := d.db.QueryRowContext(ctx, "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE TABLE_NAME = 'memo' AND TABLE_TYPE = 'BASE TABLE')").Scan(&exists)
if err != nil { if err != nil {
return false, errors.Wrap(err, "failed to check if database is initialized") return false, errors.Wrap(err, "failed to check if database is initialized")
} }
......
...@@ -49,7 +49,7 @@ func (d *DB) Close() error { ...@@ -49,7 +49,7 @@ func (d *DB) Close() error {
func (d *DB) IsInitialized(ctx context.Context) (bool, error) { func (d *DB) IsInitialized(ctx context.Context) (bool, error) {
var exists bool var exists bool
err := d.db.QueryRow("SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'memo' AND table_type = 'BASE TABLE')").Scan(&exists) err := d.db.QueryRowContext(ctx, "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = 'memo' AND table_type = 'BASE TABLE')").Scan(&exists)
if err != nil { if err != nil {
return false, errors.Wrap(err, "failed to check if database is initialized") return false, errors.Wrap(err, "failed to check if database is initialized")
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment