mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 16:47:32 +00:00
fixing linting issues
This commit is contained in:
@@ -16,9 +16,9 @@ type Instance struct {
|
||||
ConsoleClientID string `json:"console_client_id,omitempty" db:"console_client_id"`
|
||||
ConsoleAppID string `json:"console_app_id,omitempty" db:"console_app_id"`
|
||||
DefaultLanguage string `json:"default_language,omitempty" db:"default_language"`
|
||||
CreatedAt time.Time `json:"-,omitempty" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"-,omitempty" db:"updated_at"`
|
||||
DeletedAt *time.Time `json:"-,omitempty" db:"deleted_at"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deleted_at" db:"deleted_at"`
|
||||
}
|
||||
|
||||
type instanceCacheIndex uint8
|
||||
|
@@ -50,7 +50,7 @@ func (i *instance) List(ctx context.Context, opts ...database.Condition) ([]*dom
|
||||
|
||||
builder.WriteString(queryInstanceStmt)
|
||||
|
||||
// return only non deleted isntances
|
||||
// return only non deleted instances
|
||||
opts = append(opts, database.IsNull(i.DeletedAtColumn()))
|
||||
andCondition := database.And(opts...)
|
||||
i.writeCondition(&builder, andCondition)
|
||||
|
@@ -34,20 +34,20 @@ func newEmbeededDB() (pool database.PoolTest, stop func(), err error) {
|
||||
var connector database.Connector
|
||||
connector, stop, err = embedded.StartEmbedded()
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("unable to start embedded postgres: %v", err)
|
||||
return nil, nil, fmt.Errorf("unable to start embedded postgres: %w", err)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
pool_, err := connector.Connect(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("unable to connect to embedded postgres: %v", err)
|
||||
return nil, nil, fmt.Errorf("unable to connect to embedded postgres: %w", err)
|
||||
}
|
||||
pool = pool_.(database.PoolTest)
|
||||
|
||||
err = pool.MigrateTest(ctx)
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("unable to migrate database: %v", err)
|
||||
return nil, nil, fmt.Errorf("unable to migrate database: %w", err)
|
||||
}
|
||||
return pool, stop, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user