diff --git a/pkg/common/db/s3/minio/minio.go b/pkg/common/db/s3/minio/minio.go index 1f848d1b4..bfe40a594 100644 --- a/pkg/common/db/s3/minio/minio.go +++ b/pkg/common/db/s3/minio/minio.go @@ -77,15 +77,15 @@ func NewMinio() (s3.Interface, error) { return nil, err } m := &Minio{ - bucket: conf.Bucket, - bucketURL: conf.Endpoint + "/" + conf.Bucket + "/", - core: &minio.Core{Client: client}, - lock: &sync.Mutex{}, - init: false, + bucket: conf.Bucket, + core: &minio.Core{Client: client}, + lock: &sync.Mutex{}, + init: false, } if conf.SignEndpoint == "" || conf.SignEndpoint == conf.Endpoint { m.opts = opts m.sign = m.core.Client + m.bucketURL = conf.Endpoint + "/" + conf.Bucket + "/" } else { su, err := url.Parse(conf.SignEndpoint) if err != nil { @@ -99,6 +99,7 @@ func NewMinio() (s3.Interface, error) { if err != nil { return nil, err } + m.bucketURL = conf.SignEndpoint + "/" + conf.Bucket + "/" } ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() diff --git a/test/data-conversion/kafka-conversation.go b/test/data-conversion/kafka-conversation.go index 418b2e7d7..e3a26e009 100644 --- a/test/data-conversion/kafka-conversation.go +++ b/test/data-conversion/kafka-conversation.go @@ -16,6 +16,7 @@ package data_conversion import ( "fmt" + "github.com/Shopify/sarama" ) diff --git a/test/data-conversion/mysql-conversion.go b/test/data-conversion/mysql-conversion.go index 5c24dd6e2..08d7ab789 100644 --- a/test/data-conversion/mysql-conversion.go +++ b/test/data-conversion/mysql-conversion.go @@ -17,11 +17,13 @@ package data_conversion import ( "context" "fmt" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" + "time" + "github.com/OpenIMSDK/tools/log" "gorm.io/driver/mysql" "gorm.io/gorm" - "time" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" ) var (