mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
fix: fix all lint warning in pkg (#1263)
* fix:fix lint errors in internal * fix:fix lint error in interal/tools * fix: fix lint errros in pkg/statics * fix: fix lint erros in pkg/authverify,pkg/rpcclien * fix: fix lint erros in pkg/common/cmd * fix: fix lint erros in pkg/common/config,convert * fix: fix lint erros in pkg/common/db/cache * fix: fix lint errors in pkg/common/db/controller * fix:fix lint errors in pkg/common/db/relation and pkg/common/db/localcache * fix: fix rest lint errors in pkg/common/db * fix: fix rest lint errors in pkg * fix:set back go.work to use go 1.19
This commit is contained in:
Regular → Executable
+5
-4
@@ -42,14 +42,13 @@ func NewThird(discov discoveryregistry.SvcDiscoveryRegistry) *Third {
|
||||
panic(err)
|
||||
}
|
||||
client := third.NewThirdClient(conn)
|
||||
minioClient, err := minioInit()
|
||||
minioClient, _ := minioInit()
|
||||
|
||||
return &Third{discov: discov, Client: client, conn: conn, MinioClient: minioClient}
|
||||
}
|
||||
|
||||
func minioInit() (*minio.Client, error) {
|
||||
minioClient := &minio.Client{}
|
||||
var initUrl string
|
||||
initUrl = config.Config.Object.Minio.Endpoint
|
||||
initUrl := config.Config.Object.Minio.Endpoint
|
||||
minioUrl, err := url.Parse(initUrl)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -63,9 +62,11 @@ func minioInit() (*minio.Client, error) {
|
||||
} else if minioUrl.Scheme == "https" {
|
||||
opts.Secure = true
|
||||
}
|
||||
var minioClient *minio.Client
|
||||
minioClient, err = minio.New(minioUrl.Host, opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return minioClient, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user