From 4dbd9eadab93364b5d32c9a4980e35751de68c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Wed, 25 May 2022 15:38:00 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 ++- aliyun.go | 18 ++++++------------ version.go | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 442794a..59e4287 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ .vscode *.log gomod.sh -/vendor/ \ No newline at end of file +/vendor/ +aliyun_test.go \ No newline at end of file diff --git a/aliyun.go b/aliyun.go index dd740b7..8b47447 100644 --- a/aliyun.go +++ b/aliyun.go @@ -102,13 +102,13 @@ func (c *AliYun) configEndpoint(wg *sync.WaitGroup) { } // 填写存储空间名称 - c.endpointInfo.bucket, c.endpointInfo.error = c.client.Bucket(c.bucketName) + c.endpointInfo.bucket, c.endpointInfo.error = c.endpointInfo.client.Bucket(c.bucketName) if c.endpointInfo.error != nil { return } // 判断存储空间是否存在 - _, c.endpointInfo.error = c.client.IsBucketExist(c.bucketName) + _, c.endpointInfo.error = c.endpointInfo.client.IsBucketExist(c.bucketName) if c.endpointInfo.error != nil { return } @@ -132,13 +132,13 @@ func (c *AliYun) configEndpointEcs(wg *sync.WaitGroup) { } // 填写存储空间名称 - c.endpointEcsInfo.bucket, c.endpointEcsInfo.error = c.client.Bucket(c.bucketName) + c.endpointEcsInfo.bucket, c.endpointEcsInfo.error = c.endpointEcsInfo.client.Bucket(c.bucketName) if c.endpointEcsInfo.error != nil { return } // 判断存储空间是否存在 - _, c.endpointEcsInfo.error = c.client.IsBucketExist(c.bucketName) + _, c.endpointEcsInfo.error = c.endpointEcsInfo.client.IsBucketExist(c.bucketName) if c.endpointEcsInfo.error != nil { return } @@ -163,13 +163,13 @@ func (c *AliYun) configEndpointAccelerate(wg *sync.WaitGroup) { } // 填写存储空间名称 - c.endpointAccelerateInfo.bucket, c.endpointAccelerateInfo.error = c.client.Bucket(c.bucketName) + c.endpointAccelerateInfo.bucket, c.endpointAccelerateInfo.error = c.endpointAccelerateInfo.client.Bucket(c.bucketName) if c.endpointAccelerateInfo.error != nil { return } // 判断存储空间是否存在 - _, c.endpointAccelerateInfo.error = c.client.IsBucketExist(c.bucketName) + _, c.endpointAccelerateInfo.error = c.endpointAccelerateInfo.client.IsBucketExist(c.bucketName) if c.endpointAccelerateInfo.error != nil { return } @@ -179,12 +179,6 @@ func (c *AliYun) configEndpointAccelerate(wg *sync.WaitGroup) { return } -// Bucket 存储空间 -func (c *AliYun) Bucket(name string) *AliYun { - c.bucket, c.error = c.client.Bucket(name) - return c -} - // PutObject 上传文件流 // @param file 文件流 // @param filePath 文件路径 diff --git a/version.go b/version.go index 06484dd..7905c29 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package gostorage -const Version = "1.0.8" +const Version = "1.0.9"