Skip to content

Commit de8fcfb

Browse files
committed
refactor: refactor cluster command in cmd/cluster/cluster.go
- Remove the `RunE` command from the `status` command in the `cmd/cluster/cluster.go` file Signed-off-by: ysicing <[email protected]>
1 parent 204812f commit de8fcfb

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

cmd/cluster/cluster.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,6 @@ func StatusCommand(f factory.Factory) *cobra.Command {
135135
status := &cobra.Command{
136136
Use: "status",
137137
Short: "status cluster",
138-
RunE: func(cmd *cobra.Command, args []string) error {
139-
return nil
140-
},
141138
}
142139
status.AddCommand(statussubcmd.TopNodeCmd())
143140
return status

internal/pkg/status/k8s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (k *K8sStatusCollector) ingressStatus(ctx context.Context, ns, name, aliasn
311311
if unavailable := stateCount.Unavailable - notReady; unavailable > 0 {
312312
k.option.Log.Warnf("%d pods of DaemonSet %s are not available", unavailable, name)
313313
}
314-
} else if deploy != nil && !deploy.CreationTimestamp.IsZero(){
314+
} else if deploy != nil && !deploy.CreationTimestamp.IsZero() {
315315
k.option.Log.Debugf("detch %s kind Deployment", name)
316316
stateCount.Type = "Deployment"
317317
if *deploy.Spec.Replicas > 0 {

0 commit comments

Comments
 (0)