- 修复阿里云初始化
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

master v1.0.9
李光春 2 years ago
parent 063f9f85ee
commit 4dbd9eadab

3
.gitignore vendored

@ -5,4 +5,5 @@
.vscode
*.log
gomod.sh
/vendor/
/vendor/
aliyun_test.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 文件路径

@ -1,3 +1,3 @@
package gostorage
const Version = "1.0.8"
const Version = "1.0.9"

Loading…
Cancel
Save