Skip to content

Commit ae4d305

Browse files
committed
Linter
1 parent a12a201 commit ae4d305

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

cmd/autocomplete/databases_ng_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func DatabasesNgListAutoComplete(ctx context.Context) error {
1717
databases, err := client.Preview().DatabasesList(ctx)
1818
if err == nil {
1919
for _, db := range databases {
20-
fmt.Println(db.DatabaseInfo.ID)
20+
fmt.Println(db.ID)
2121
}
2222
}
2323

dbng/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func Create(ctx context.Context, params scalingo.DatabaseCreateParams, wait bool
4646
spinner.Start()
4747
defer spinner.Stop()
4848

49-
err = waitForRunningDatabase(ctx, c, db.DatabaseInfo.ID)
49+
err = waitForRunningDatabase(ctx, c, db.ID)
5050
if err != nil {
5151
return errors.Wrap(ctx, err, "wait for running database")
5252
}

dbng/destroy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func Destroy(ctx context.Context, appID string) error {
2020
return errors.Wrap(ctx, err, "delete database")
2121
}
2222

23-
io.Warningf("You're going to delete database %s ('%s'),\n", db.DatabaseInfo.ID, db.DatabaseInfo.Name)
23+
io.Warningf("You're going to delete database %s ('%s'),\n", db.ID, db.Name)
2424
io.Warning()
2525
io.Warning("This operation is irreversible, all data including backups of your database will be deleted.")
2626

@@ -32,7 +32,7 @@ func Destroy(ctx context.Context, appID string) error {
3232
}
3333
fmt.Println()
3434

35-
if validationID != db.DatabaseInfo.ID && validationID != db.DatabaseInfo.Name {
35+
if validationID != db.ID && validationID != db.Name {
3636
return errors.Newf(ctx, "'%s' is not the ID or the name of the database, aborting…\n", validationID)
3737
}
3838

@@ -41,7 +41,7 @@ func Destroy(ctx context.Context, appID string) error {
4141
return errors.Wrap(ctx, err, "delete database")
4242
}
4343

44-
io.Statusf("The database %s has been deleted.", db.DatabaseInfo.ID)
44+
io.Statusf("The database %s has been deleted.", db.ID)
4545

4646
return nil
4747
}

dbng/info.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ func Info(ctx context.Context, appID string) error {
3535
}
3636

3737
data := [][]string{
38-
{"ID", db.DatabaseInfo.ID},
39-
{"Name", db.DatabaseInfo.Name},
40-
{"Type", db.DatabaseInfo.Technology},
41-
{"Plan", db.DatabaseInfo.Plan},
38+
{"ID", db.ID},
39+
{"Name", db.Name},
40+
{"Type", db.Technology},
41+
{"Plan", db.Plan},
4242
{"Status", string(db.Database.Status)},
4343
{"Version", db.Database.ReadableVersion},
4444
{"Force TLS ", forceSSL},

dbng/list.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ func List(ctx context.Context) error {
3737
role := utils.AppRole(currentUser, &db.App)
3838

3939
_ = t.Append([]string{
40-
db.DatabaseInfo.ID,
41-
db.DatabaseInfo.Name,
42-
db.DatabaseInfo.Technology,
43-
db.DatabaseInfo.Plan,
40+
db.ID,
41+
db.Name,
42+
db.Technology,
43+
db.Plan,
4444
string(role),
4545
string(db.Database.Status),
4646
db.App.Project.Name,

utils/consent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func CheckForConsent(ctx context.Context, resourceName string, consentTypes ...C
8484
}
8585

8686
for _, db := range dbs {
87-
if db.DatabaseInfo.Name == resourceName || db.DatabaseInfo.ID == resourceName {
87+
if db.Name == resourceName || db.ID == resourceName {
8888
// The operator is a collaborator, no consent needed
8989
return
9090
}

0 commit comments

Comments
 (0)