fix: fix the minio nil error

This commit is contained in:
luhaoling 2024-02-02 20:23:24 +08:00
parent a23ae2294d
commit e33c66ca6c
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,7 @@ func NewZookeeperDiscoveryRegister() (discoveryregistry.SvcDiscoveryRegistry, er
openkeeper.WithLogger(log.NewZkLogger()),
)
if err != nil {
uriFormat := "address:%s, username :%s, password :%s, schema:%s."
uriFormat := "address:%s, username:%s, password:%s, schema:%s."
errInfo := fmt.Sprintf(uriFormat,
config.Config.Zookeeper.ZkAddr,
config.Config.Zookeeper.Username,

View File

@ -15,6 +15,7 @@
package main
import (
"errors"
"flag"
"fmt"
"github.com/IBM/sarama"
@ -125,7 +126,7 @@ func checkMinio() error {
// Check if MinIO is enabled
if config.Config.Object.Enable != "minio" {
return nil
return errs.Wrap(errors.New("minio.Enable is empty"))
}
minio := &component.Minio{
ApiURL: config.Config.Object.ApiURL,