Skip to content

Commit

Permalink
fix: modify output information
Browse files Browse the repository at this point in the history
Signed-off-by: ycyaoxdu <[email protected]>
  • Loading branch information
ycyaoxdu committed Mar 15, 2022
1 parent 0c3f63a commit 18b88c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/cmd/clusterset/bind/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ func (o *Options) run() (err error) {

_, err = clusterClient.ClusterV1beta1().ManagedClusterSetBindings(o.Namespace).Create(context.TODO(), binding, metav1.CreateOptions{})
if errors.IsAlreadyExists(err) {
fmt.Fprintf(o.Streams.Out, "Clusterset %s is already bound to Clusterset %s\n", o.Namespace, o.Clusterset)
fmt.Fprintf(o.Streams.Out, "Clusterset %s is already bound to Namespace %s\n", o.Clusterset, o.Namespace)
return nil
}

if err != nil {
return err
}

fmt.Fprintf(o.Streams.Out, "Clusterset %s is bound to Clusterset %s\n", o.Namespace, o.Clusterset)
fmt.Fprintf(o.Streams.Out, "Clusterset %s is bound to Namespace %s\n", o.Clusterset, o.Namespace)
return nil
}
2 changes: 1 addition & 1 deletion pkg/cmd/create/clusterset/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (o *Options) runWithClient(clusterClient clusterclientset.Interface,

_, err := clusterClient.ClusterV1beta1().ManagedClusterSets().Get(context.TODO(), clusterset, metav1.GetOptions{})
if err == nil {
fmt.Fprintf(o.Streams.Out, "Clusterset %s is created already\n", clusterset)
fmt.Fprintf(o.Streams.Out, "Clusterset %s is already created\n", clusterset)
return nil
}

Expand Down

0 comments on commit 18b88c7

Please sign in to comment.