Skip to content

Commit d767c34

Browse files
author
qimiao
committed
fmt project
1 parent 4628b8d commit d767c34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/config/oss.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type AliyunOSS struct {
2020
AccessKeySecret string `mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
2121
BucketName string `mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
2222
BucketUrl string `mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
23-
BasePath string `mapstructure:"base-path" json:"basePath" yaml:"base-path"`
23+
BasePath string `mapstructure:"base-path" json:"basePath" yaml:"base-path"`
2424
}
2525
type TencentCOS struct {
2626
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`

server/utils/upload/qiniu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (*Qiniu) UploadFile(file *multipart.FileHeader) (string, string, error) {
3838

3939
return "", "", errors.New("function file.Open() Filed, err:" + openError.Error())
4040
}
41-
defer f.Close() // 创建文件 defer 关闭
41+
defer f.Close() // 创建文件 defer 关闭
4242
fileKey := fmt.Sprintf("%d%s", time.Now().Unix(), file.Filename) // 文件名格式 自己可以改 建议保证唯一性
4343
putErr := formUploader.Put(context.Background(), &ret, upToken, fileKey, f, file.Size, &putExtra)
4444
if putErr != nil {

0 commit comments

Comments
 (0)