mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-25 15:53:09 -06:00
Linting
This commit is contained in:
parent
5a63ec5895
commit
5b03d9100f
|
|
@ -39,6 +39,7 @@ var (
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// nolint: gocyclo
|
||||||
func main() {
|
func main() {
|
||||||
err := flags.Parse(os.Args[1:])
|
err := flags.Parse(os.Args[1:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,13 @@ func (m *Migrations) RunDeltas(db *sql.DB, props *config.DatabaseOptions) error
|
||||||
return fmt.Errorf("RunDeltas: Failed to collect migrations: %w", err)
|
return fmt.Errorf("RunDeltas: Failed to collect migrations: %w", err)
|
||||||
}
|
}
|
||||||
if props.ConnectionString.IsPostgres() {
|
if props.ConnectionString.IsPostgres() {
|
||||||
goose.SetDialect("postgres")
|
if err = goose.SetDialect("postgres"); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
} else if props.ConnectionString.IsSQLite() {
|
} else if props.ConnectionString.IsSQLite() {
|
||||||
goose.SetDialect("sqlite3")
|
if err = goose.SetDialect("sqlite3"); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return fmt.Errorf("Unknown connection string: %s", props.ConnectionString)
|
return fmt.Errorf("Unknown connection string: %s", props.ConnectionString)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue