Skip to content

Commit 7c9b5ff

Browse files
fix: all the linter issues reported
1 parent 5d09d8f commit 7c9b5ff

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

api-datatypes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type StringMap map[string]string
4343
// if m is nil it can be initialized, which is often the case if m is
4444
// nested in another xml structural. This is also why the first thing done
4545
// on the first line is initialize it.
46-
func (m *StringMap) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
46+
func (m *StringMap) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error {
4747
*m = StringMap{}
4848
type Item struct {
4949
Key string

api-remove.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func generateRemoveMultiObjectsRequest(objects []ObjectInfo) []byte {
235235

236236
// processRemoveMultiObjectsResponse - parse the remove multi objects web service
237237
// and return the success/failure result status for each object
238-
func processRemoveMultiObjectsResponse(body io.Reader, objects []ObjectInfo, resultCh chan<- RemoveObjectResult) {
238+
func processRemoveMultiObjectsResponse(body io.Reader, resultCh chan<- RemoveObjectResult) {
239239
// Parse multi delete XML response
240240
rmResult := &deleteMultiObjectsResult{}
241241
err := xmlDecoder(body, rmResult)
@@ -459,7 +459,7 @@ func (c *Client) removeObjects(ctx context.Context, bucketName string, objectsCh
459459
}
460460

461461
// Process multiobjects remove xml response
462-
processRemoveMultiObjectsResponse(resp.Body, batch, resultCh)
462+
processRemoveMultiObjectsResponse(resp.Body, resultCh)
463463

464464
closeResponse(resp)
465465
}

api-s3-datatypes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ type ListVersionsResult struct {
110110
// UnmarshalXML is a custom unmarshal code for the response of ListObjectVersions, the custom
111111
// code will unmarshal <Version> and <DeleteMarker> tags and save them in Versions field to
112112
// preserve the lexical order of the listing.
113-
func (l *ListVersionsResult) UnmarshalXML(d *xml.Decoder, start xml.StartElement) (err error) {
113+
func (l *ListVersionsResult) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) (err error) {
114114
for {
115115
// Read tokens from the XML document in a stream.
116116
t, err := d.Token()

pkg/s3utils/utils.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ func EncodePath(pathName string) string {
339339
encodedPathname.WriteRune(s)
340340
continue
341341
default:
342-
len := utf8.RuneLen(s)
343-
if len < 0 {
342+
l := utf8.RuneLen(s)
343+
if l < 0 {
344344
// if utf8 cannot convert return the same string as is
345345
return pathName
346346
}
347-
u := make([]byte, len)
347+
u := make([]byte, l)
348348
utf8.EncodeRune(u, s)
349349
for _, r := range u {
350350
hex := hex.EncodeToString([]byte{r})

0 commit comments

Comments
 (0)