Skip to content

Commit 4621667

Browse files
committed
update lint version
1 parent 5945ad3 commit 4621667

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: golangci/golangci-lint-action@v2
1414
with:
1515
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
16-
version: v1.31
16+
version: v1.33
1717
# Optional: golangci-lint command line arguments.
1818
args: --issues-exit-code=0 --out-format=colored-line-number --print-issued-lines=false
1919
# Optional: working directory, useful for monorepos

upyun/fileinfo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ func parseHeaderToFileInfo(header http.Header, getinfo bool) *FileInfo {
5454
} else {
5555
fInfo.Size = parseStrToInt(header.Get("Content-Length"))
5656
fInfo.ContentType = header.Get("Content-Type")
57-
fInfo.MD5 = strings.Replace(header.Get("Content-Md5"), "\"", "", -1)
57+
fInfo.MD5 = strings.ReplaceAll(header.Get("Content-Md5"), "\"", "")
5858
if fInfo.MD5 == "" {
59-
fInfo.MD5 = strings.Replace(header.Get("Etag"), "\"", "", -1)
59+
fInfo.MD5 = strings.ReplaceAll(header.Get("Etag"), "\"", "")
6060
}
6161
lastM := header.Get("Last-Modified")
6262
t, err := http.ParseTime(lastM)

upyun/rest.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type CopyObjectConfig struct {
8585
Headers map[string]string
8686
}
8787

88-
//UploadFileConfig is multipart file upload config
88+
// UploadFileConfig is multipart file upload config
8989
type UploadPartConfig struct {
9090
Reader io.Reader
9191
PartSize int64
@@ -97,7 +97,7 @@ type CompleteMultipartUploadConfig struct {
9797
type InitMultipartUploadConfig struct {
9898
Path string
9999
PartSize int64
100-
ContentLength int64 //optional
100+
ContentLength int64 // optional
101101
ContentType string
102102
OrderUpload bool
103103
}
@@ -110,7 +110,7 @@ type InitMultipartUploadResult struct {
110110
type DeleteObjectConfig struct {
111111
Path string
112112
Async bool
113-
Folder bool //optional
113+
Folder bool // optional
114114
}
115115

116116
type ModifyMetadataConfig struct {

upyun/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ var (
3939

4040
func makeRFC1123Date(d time.Time) string {
4141
utc := d.UTC().Format(time.RFC1123)
42-
return strings.Replace(utc, "UTC", "GMT", -1)
42+
return strings.ReplaceAll(utc, "UTC", "GMT")
4343
}
4444

4545
func makeUserAgent(version string) string {

0 commit comments

Comments
 (0)