File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11package use
22
33import (
4- "github.com/bf2fc6cc711aee1a0c2a/cli/pkg/kafka"
5- "github.com/bf2fc6cc711aee1a0c2a/cli/pkg/api/kas"
64 "context"
75 "fmt"
86
7+ "github.com/bf2fc6cc711aee1a0c2a/cli/pkg/api/kas"
8+ "github.com/bf2fc6cc711aee1a0c2a/cli/pkg/color"
9+ "github.com/bf2fc6cc711aee1a0c2a/cli/pkg/kafka"
10+
911 "github.com/MakeNowJust/heredoc"
1012
1113 "github.com/spf13/cobra"
@@ -78,7 +80,7 @@ func runUse(opts *options) error {
7880 if kas .IsErr (apiErr , kas .ErrorNotFound ) {
7981 return kafka .ErrorNotFound (opts .id )
8082 }
81-
83+
8284 if apiErr .Error () != "" {
8385 return fmt .Errorf ("Unable to retrieve Kafka instance \" %v\" : %w" , opts .id , apiErr )
8486 }
@@ -93,7 +95,7 @@ func runUse(opts *options) error {
9395 return fmt .Errorf ("Unable to use Kafka instance: %w" , err )
9496 }
9597
96- logger .Infof ("Using Kafka instance \" %v \" \n " , * res .Id )
98+ logger .Infof ("Now using Kafka instance %v." , color . Info ( res .GetName ()) )
9799
98100 return nil
99101}
You can’t perform that action at this time.
0 commit comments