|
5 | 5 | "fmt" |
6 | 6 | "strings" |
7 | 7 |
|
8 | | - "github.com/stackitcloud/stackit-cli/internal/pkg/projectname" |
9 | 8 | "github.com/stackitcloud/stackit-cli/internal/pkg/types" |
10 | 9 |
|
11 | 10 | "github.com/stackitcloud/stackit-cli/internal/pkg/utils" |
@@ -80,18 +79,12 @@ func NewCmd(params *types.CmdParams) *cobra.Command { |
80 | 79 |
|
81 | 80 | items := resp.GetItems() |
82 | 81 |
|
83 | | - projectLabel, err := projectname.GetProjectName(ctx, params.Printer, params.CliVersion, cmd) |
84 | | - if err != nil { |
85 | | - params.Printer.Debug(print.ErrorLevel, "get project name: %v", err) |
86 | | - projectLabel = model.ProjectId |
87 | | - } |
88 | | - |
89 | 82 | // Truncate output |
90 | 83 | if model.Limit != nil && len(items) > int(*model.Limit) { |
91 | 84 | items = items[:*model.Limit] |
92 | 85 | } |
93 | 86 |
|
94 | | - return outputResult(params.Printer, model.OutputFormat, projectLabel, items) |
| 87 | + return outputResult(params.Printer, model.OutputFormat, items) |
95 | 88 | }, |
96 | 89 | } |
97 | 90 | configureFlags(cmd) |
@@ -132,7 +125,7 @@ func buildRequest(ctx context.Context, model *inputModel, apiClient *iaas.APICli |
132 | 125 | return req |
133 | 126 | } |
134 | 127 |
|
135 | | -func outputResult(p *print.Printer, outputFormat, projectLabel string, keyPairs []iaas.Keypair) error { |
| 128 | +func outputResult(p *print.Printer, outputFormat string, keyPairs []iaas.Keypair) error { |
136 | 129 | return p.OutputResult(outputFormat, keyPairs, func() error { |
137 | 130 | if len(keyPairs) == 0 { |
138 | 131 | p.Outputf("No key pairs found\n") |
|
0 commit comments