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 1a74a74 commit 35c0665
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 35c0665

Please sign in to comment.