style: Run make fmt

This commit is contained in:
Michael Gaffney committed 2021-10-11 16:00:32 -04:00
1 parent 43b4d69517
commit 7ccab48a3c
5 files changed
+6 -5

No files matched your search

@@ -215,7 +215,6 @@ func (r *Repository) authenticate(ctx context.Context, scopeId, authMethodId, lo
var accts []authAccount
rows, err := r.reader.Query(ctx, authenticateQuery, []interface{}{sql.Named("auth_method_id", authMethodId), sql.Named("login_name", loginName)})
if err != nil {
return nil, errors.Wrap(ctx, err, op)
}
+3 -1
View File
@@ -29,6 +29,7 @@ func (db DbType) String() string {
"postgres",
}[db]
}
func StringToDbType(dialect string) (DbType, error) {
switch dialect {
case "postgres":
@@ -80,7 +81,8 @@ func Open(dbType DbType, connectionUrl string, opt ...Option) (*DB, error) {
switch dbType {
case Postgres:
dialect = postgres.New(postgres.Config{
DSN: connectionUrl},
DSN: connectionUrl,
},
)
default:
return nil, fmt.Errorf("unable to open %s database type", dbType)
+1 -1
View File
@@ -17,7 +17,7 @@ const (
)
var supportedDialects = map[Dialect]struct{}{
Postgres: struct{}{},
Postgres: {},
}
// type dialects map[Dialect]edition.Editions
@@ -155,5 +155,4 @@ func TestProvider(t *testing.T) {
assert.Nil(t, p.Statements(), tt.name)
})
}
}
+2 -1
View File
@@ -41,7 +41,8 @@ func testOpen(dbType string, connectionUrl string) (*gorm.DB, error) {
switch dbType {
case "postgres":
dialect = postgres.New(postgres.Config{
DSN: connectionUrl},
DSN: connectionUrl,
},
)
default:
return nil, fmt.Errorf("unable to open %s database type", dbType)