From e0d22359e7468e2795acabc394e6b3334759d8b5 Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Wed, 16 Jan 2019 12:49:20 -0800 Subject: [PATCH] Fix lint warnings (#7099) --- cmd/admin-handlers.go | 2 +- cmd/object-handlers_test.go | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 4fafd5501..95ed44af3 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -269,7 +269,7 @@ func (a adminAPIHandlers) ServerInfoHandler(w http.ResponseWriter, r *http.Reque } serverInfo := globalNotificationSys.ServerInfo(ctx) - // Once we have recieved all the ServerInfo from peers + // Once we have received all the ServerInfo from peers // add the local peer server info as well. serverInfo = append(serverInfo, ServerInfo{ Addr: thisAddr.String(), diff --git a/cmd/object-handlers_test.go b/cmd/object-handlers_test.go index 85443b384..b6902fb2d 100644 --- a/cmd/object-handlers_test.go +++ b/cmd/object-handlers_test.go @@ -1526,7 +1526,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri testCases := []struct { bucketName string copySourceHeader string // data for "X-Amz-Copy-Source" header. Contains the object to be copied in the URL. - copySourceVersionId string // data for "X-Amz-Copy-Source-Version-Id" header. + copySourceVersionID string // data for "X-Amz-Copy-Source-Version-Id" header. copySourceRange string // data for "X-Amz-Copy-Source-Range" header, contains the byte range offsets of data to be copied. uploadID string // uploadID of the transaction. invalidPartNumber bool // Sets an invalid multipart. @@ -1719,7 +1719,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri bucketName: bucketName, uploadID: uploadID, copySourceHeader: url.QueryEscape("/" + bucketName + "/" + objectName), - copySourceVersionId: "null", + copySourceVersionID: "null", accessKey: credentials.AccessKey, secretKey: credentials.SecretKey, expectedRespStatus: http.StatusOK, @@ -1729,7 +1729,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri bucketName: bucketName, uploadID: uploadID, copySourceHeader: url.QueryEscape("/" + bucketName + "/" + objectName), - copySourceVersionId: "17", + copySourceVersionID: "17", accessKey: credentials.AccessKey, secretKey: credentials.SecretKey, expectedRespStatus: http.StatusNotFound, @@ -1757,8 +1757,8 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri if testCase.copySourceHeader != "" { req.Header.Set("X-Amz-Copy-Source", testCase.copySourceHeader) } - if testCase.copySourceVersionId != "" { - req.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionId) + if testCase.copySourceVersionID != "" { + req.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionID) } if testCase.copySourceRange != "" { req.Header.Set("X-Amz-Copy-Source-Range", testCase.copySourceRange) @@ -1795,8 +1795,8 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri if testCase.copySourceHeader != "" { reqV2.Header.Set("X-Amz-Copy-Source", testCase.copySourceHeader) } - if testCase.copySourceVersionId != "" { - reqV2.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionId) + if testCase.copySourceVersionID != "" { + reqV2.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionID) } if testCase.copySourceRange != "" { reqV2.Header.Set("X-Amz-Copy-Source-Range", testCase.copySourceRange) @@ -1910,7 +1910,7 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string, bucketName string newObjectName string // name of the newly copied object. copySourceHeader string // data for "X-Amz-Copy-Source" header. Contains the object to be copied in the URL. - copySourceVersionId string // data for "X-Amz-Copy-Source-Version-Id" header. + copySourceVersionID string // data for "X-Amz-Copy-Source-Version-Id" header. copyModifiedHeader string // data for "X-Amz-Copy-Source-If-Modified-Since" header copyUnmodifiedHeader string // data for "X-Amz-Copy-Source-If-Unmodified-Since" header metadataGarbage bool @@ -2144,7 +2144,7 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string, bucketName: bucketName, newObjectName: "newObject1", copySourceHeader: url.QueryEscape("/" + bucketName + "/" + objectName), - copySourceVersionId: "null", + copySourceVersionID: "null", accessKey: credentials.AccessKey, secretKey: credentials.SecretKey, expectedRespStatus: http.StatusOK, @@ -2154,7 +2154,7 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string, bucketName: bucketName, newObjectName: "newObject1", copySourceHeader: url.QueryEscape("/" + bucketName + "/" + objectName), - copySourceVersionId: "17", + copySourceVersionID: "17", accessKey: credentials.AccessKey, secretKey: credentials.SecretKey, expectedRespStatus: http.StatusNotFound, @@ -2177,8 +2177,8 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string, if testCase.copySourceHeader != "" { req.Header.Set("X-Amz-Copy-Source", testCase.copySourceHeader) } - if testCase.copySourceVersionId != "" { - req.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionId) + if testCase.copySourceVersionID != "" { + req.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionID) } if testCase.copyModifiedHeader != "" { req.Header.Set("X-Amz-Copy-Source-If-Modified-Since", testCase.copyModifiedHeader) @@ -2241,8 +2241,8 @@ func testAPICopyObjectHandler(obj ObjectLayer, instanceType, bucketName string, if testCase.copySourceHeader != "" { reqV2.Header.Set("X-Amz-Copy-Source", testCase.copySourceHeader) } - if testCase.copySourceVersionId != "" { - reqV2.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionId) + if testCase.copySourceVersionID != "" { + reqV2.Header.Set("X-Amz-Copy-Source-Version-Id", testCase.copySourceVersionID) } if testCase.copyModifiedHeader != "" { reqV2.Header.Set("X-Amz-Copy-Source-If-Modified-Since", testCase.copyModifiedHeader)