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"