Skip to content

Commit cc50e9b

Browse files
committed
switched to getter for retrieving the items
1 parent 3746b40 commit cc50e9b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

internal/cmd/server/list/list.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,9 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7878
return fmt.Errorf("list servers: %w", err)
7979
}
8080

81-
var items []iaas.Server
82-
if resp.Items == nil {
81+
items := resp.GetItems()
82+
if items == nil {
8383
items = []iaas.Server{}
84-
} else {
85-
items = *resp.Items
8684
}
8785

8886
projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd)

0 commit comments

Comments
 (0)