remove logs
This commit is contained in:
parent
3a4bb6d7b1
commit
ce13b7762f
|
@ -1,5 +1,7 @@
|
||||||
package minio
|
package minio
|
||||||
|
|
||||||
|
var region = "ap-southeast-1"
|
||||||
|
|
||||||
var Buckets = struct {
|
var Buckets = struct {
|
||||||
HelpCenter string
|
HelpCenter string
|
||||||
}{
|
}{
|
||||||
|
|
9
minio.go
9
minio.go
|
@ -1,7 +1,6 @@
|
||||||
package minio
|
package minio
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
@ -14,12 +13,10 @@ func Init(cfg Config) (*Client, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("cfg", cfg)
|
|
||||||
|
|
||||||
client, err := min.New(cfg.Endpoint, &min.Options{
|
client, err := min.New(cfg.Endpoint, &min.Options{
|
||||||
Creds: credentials.NewStaticV4(cfg.AccessKey, cfg.SecretKey, ""),
|
Creds: credentials.NewStaticV4(cfg.AccessKey, cfg.SecretKey, ""),
|
||||||
Secure: cfg.UseSSL,
|
Secure: cfg.UseSSL,
|
||||||
Region: "ap-southeast-1",
|
Region: region,
|
||||||
})
|
})
|
||||||
|
|
||||||
// return if error
|
// return if error
|
||||||
|
@ -34,10 +31,6 @@ func Init(cfg Config) (*Client, error) {
|
||||||
|
|
||||||
fmt.Printf("⚡️[minio]: connected to %s \n", cfg.Endpoint)
|
fmt.Printf("⚡️[minio]: connected to %s \n", cfg.Endpoint)
|
||||||
|
|
||||||
buckets, err := client.ListBuckets(context.Background())
|
|
||||||
fmt.Println("buckets", buckets)
|
|
||||||
fmt.Println("err", err)
|
|
||||||
|
|
||||||
// return
|
// return
|
||||||
return &Client{
|
return &Client{
|
||||||
client: client,
|
client: client,
|
||||||
|
|
Loading…
Reference in New Issue