style: Run make fmt
This commit is contained in:
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
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user