From a25a8312d8d7a4934c8dbef4a018a6586bf89539 Mon Sep 17 00:00:00 2001 From: huajin tong <137764712+thirdkeyword@users.noreply.github.com> Date: Mon, 11 Mar 2024 05:09:36 +0800 Subject: [PATCH] fix: some flyby typos in the code (#19212) Signed-off-by: thirdkeyword --- cmd/admin-router.go | 2 +- cmd/object-handlers_test.go | 6 +++--- internal/etag/etag.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/admin-router.go b/cmd/admin-router.go index b6e0fb2e1..d441e1196 100644 --- a/cmd/admin-router.go +++ b/cmd/admin-router.go @@ -60,7 +60,7 @@ const ( noObjLayerFlag ) -// Has checks if the the given flag is enabled in `h`. +// Has checks if the given flag is enabled in `h`. func (h hFlag) Has(flag hFlag) bool { // Use bitwise-AND and check if the result is non-zero. return h&flag != 0 diff --git a/cmd/object-handlers_test.go b/cmd/object-handlers_test.go index 6588e1285..30529d58a 100644 --- a/cmd/object-handlers_test.go +++ b/cmd/object-handlers_test.go @@ -1851,7 +1851,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri // expected output. expectedRespStatus int }{ - // Test case - 1, copy part 1 from from newObject1, ignore request headers. + // Test case - 1, copy part 1 from newObject1, ignore request headers. { bucketName: bucketName, uploadID: uploadID, @@ -2011,7 +2011,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri secretKey: credentials.SecretKey, expectedRespStatus: http.StatusOK, }, - // Test case - 14, copy part 1 from from newObject1 with null versionId + // Test case - 14, copy part 1 from newObject1 with null versionId { bucketName: bucketName, uploadID: uploadID, @@ -2020,7 +2020,7 @@ func testAPICopyObjectPartHandler(obj ObjectLayer, instanceType, bucketName stri secretKey: credentials.SecretKey, expectedRespStatus: http.StatusOK, }, - // Test case - 15, copy part 1 from from newObject1 with non null versionId + // Test case - 15, copy part 1 from newObject1 with non null versionId { bucketName: bucketName, uploadID: uploadID, diff --git a/internal/etag/etag.go b/internal/etag/etag.go index b2b082771..c891426a9 100644 --- a/internal/etag/etag.go +++ b/internal/etag/etag.go @@ -389,7 +389,7 @@ func parse(s string, strict bool) (ETag, error) { // An S3 ETag may be a multipart ETag that // contains a '-' followed by a number. - // If the ETag does not a '-' is is either + // If the ETag does not a '-' is either // a singlepart or encrypted ETag. n := strings.IndexRune(s, '-') if n == -1 {