Skip to content

Commit

Permalink
update lint version
Browse files Browse the repository at this point in the history
  • Loading branch information
huangnauh committed Jan 6, 2021
1 parent 5945ad3 commit 4621667
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.31
version: v1.33
# Optional: golangci-lint command line arguments.
args: --issues-exit-code=0 --out-format=colored-line-number --print-issued-lines=false
# Optional: working directory, useful for monorepos
Expand Down
4 changes: 2 additions & 2 deletions upyun/fileinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func parseHeaderToFileInfo(header http.Header, getinfo bool) *FileInfo {
} else {
fInfo.Size = parseStrToInt(header.Get("Content-Length"))
fInfo.ContentType = header.Get("Content-Type")
fInfo.MD5 = strings.Replace(header.Get("Content-Md5"), "\"", "", -1)
fInfo.MD5 = strings.ReplaceAll(header.Get("Content-Md5"), "\"", "")
if fInfo.MD5 == "" {
fInfo.MD5 = strings.Replace(header.Get("Etag"), "\"", "", -1)
fInfo.MD5 = strings.ReplaceAll(header.Get("Etag"), "\"", "")
}
lastM := header.Get("Last-Modified")
t, err := http.ParseTime(lastM)
Expand Down
6 changes: 3 additions & 3 deletions upyun/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type CopyObjectConfig struct {
Headers map[string]string
}

//UploadFileConfig is multipart file upload config
// UploadFileConfig is multipart file upload config
type UploadPartConfig struct {
Reader io.Reader
PartSize int64
Expand All @@ -97,7 +97,7 @@ type CompleteMultipartUploadConfig struct {
type InitMultipartUploadConfig struct {
Path string
PartSize int64
ContentLength int64 //optional
ContentLength int64 // optional
ContentType string
OrderUpload bool
}
Expand All @@ -110,7 +110,7 @@ type InitMultipartUploadResult struct {
type DeleteObjectConfig struct {
Path string
Async bool
Folder bool //optional
Folder bool // optional
}

type ModifyMetadataConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion upyun/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (

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

func makeUserAgent(version string) string {
Expand Down

0 comments on commit 4621667

Please sign in to comment.