chore: fix linter
This commit is contained in:
parent
3fd29f6493
commit
38b6c3afb9
2 changed files with 2 additions and 2 deletions
|
|
@ -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 {
|
||||||
|
|
||||||
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")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue