mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-23 14:53:10 -06:00
Linting
This commit is contained in:
parent
5a63ec5895
commit
5b03d9100f
|
|
@ -39,6 +39,7 @@ var (
|
|||
}
|
||||
)
|
||||
|
||||
// nolint: gocyclo
|
||||
func main() {
|
||||
err := flags.Parse(os.Args[1:])
|
||||
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)
|
||||
}
|
||||
if props.ConnectionString.IsPostgres() {
|
||||
goose.SetDialect("postgres")
|
||||
if err = goose.SetDialect("postgres"); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if props.ConnectionString.IsSQLite() {
|
||||
goose.SetDialect("sqlite3")
|
||||
if err = goose.SetDialect("sqlite3"); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("Unknown connection string: %s", props.ConnectionString)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue