Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lizzy-0323 committed Dec 12, 2024
1 parent 4faa655 commit 13f4779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ func NewCliCmd() *cobra.Command {
if cmd.Flags().Changed("version") {
versionCmd := version.NewCmd()
return versionCmd.RunE(cmd, args)
} else {
return cmd.Help()
}
return cmd.Help()
},
}
cmd.AddCommand(version.NewCmd())
Expand Down
7 changes: 3 additions & 4 deletions internal/dashboard/business/oceanbase/obcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/google/uuid"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
logger "github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1"
apiresource "k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -896,17 +895,17 @@ func ListOBClusterParameters(ctx context.Context, nn *param.K8sObjectIdentity) (
LabelSelector: fmt.Sprintf("%s=%s", oceanbaseconst.LabelRefOBCluster, nn.Name),
})
if err != nil {
logrus.WithError(err).Error("Failed to list observers")
logger.WithError(err).Error("Failed to list observers")
return nil, errors.Wrap(err, "List observers")
}
conn, err := utils.GetOBConnection(ctx, obcluster, "root", "sys", obcluster.Spec.UserSecrets.Root)
if err != nil {
logrus.Info("Failed to get OceanBase database connection")
logger.Info("Failed to get OceanBase database connection")
return nil, errors.Wrap(err, "Get OceanBase database connection")
}
parameters, err := conn.ListParametersWithTenantID(ctx, 1)
if err != nil {
logrus.WithError(err).Error("Failed to query parameters")
logger.WithError(err).Error("Failed to query parameters")
return nil, errors.Wrap(err, "Query parameters")
}
return parameters, nil
Expand Down

0 comments on commit 13f4779

Please sign in to comment.