Skip to content

Commit 744b689

Browse files
committed
Apply PR reviews
1 parent 95b563a commit 744b689

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

locales/cmd/kafka/common/active.en.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ description = 'Error message when list of Kafka instances could not be fetched'
1919
one = 'unable to list Kafka instances'
2020

2121
[kafka.common.input.instanceName.message]
22-
description = 'title for the Partitions input'
2322
one = 'Select Kafka instance to connect:'
2423

2524
[kafka.common.log.info.noKafkaInstances]

pkg/cmd/kafka/use/use.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func NewUseCommand(f *factory.Factory) *cobra.Command {
7373
func runUse(opts *Options) error {
7474

7575
if opts.interactive {
76-
// run the create command interactively
76+
// run the use command interactively
7777
err := runInteractivePrompt(opts)
7878
if err != nil {
7979
return err
@@ -155,7 +155,7 @@ func runInteractivePrompt(opts *Options) error {
155155
return err
156156
}
157157

158-
opts.name = *selectedKafka.Name
158+
opts.name = selectedKafka.GetName()
159159

160160
return nil
161161
}

pkg/kafka/kafka.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ import (
1212
"github.com/bf2fc6cc711aee1a0c2a/cli/pkg/logging"
1313
)
1414

15+
const (
16+
queryLimit = "1000"
17+
)
18+
1519
func InteractiveSelect(connection connection.Connection, logger logging.Logger) (*kasclient.KafkaRequest, error) {
1620
api := connection.API()
1721

18-
response, _, apiErr := api.Kafka().ListKafkas(context.Background()).Execute()
22+
response, _, apiErr := api.Kafka().ListKafkas(context.Background()).Size(queryLimit).Execute()
1923

2024
if apiErr.Error() != "" {
2125
return nil, fmt.Errorf("%v: %w", localizer.MustLocalizeFromID("kafka.common.error.couldNotFetchKafkas"), apiErr)

0 commit comments

Comments
 (0)