From 7291b810406c2603f0430a675decfd8b14320233 Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Thu, 29 Jul 2021 17:23:36 +0300 Subject: [PATCH] [#180] api: Format object_list.go Signed-off-by: Angira Kekteeva --- api/handler/object_list.go | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/api/handler/object_list.go b/api/handler/object_list.go index 1bb65c2f4..a508497ee 100644 --- a/api/handler/object_list.go +++ b/api/handler/object_list.go @@ -37,9 +37,8 @@ func encodeV1(p *layer.ListObjectsParamsV1, list *layer.ListObjectsInfoV1) *List Prefix: p.Prefix, MaxKeys: p.MaxKeys, Delimiter: p.Delimiter, - - IsTruncated: list.IsTruncated, - NextMarker: list.NextMarker, + IsTruncated: list.IsTruncated, + NextMarker: list.NextMarker, } res.CommonPrefixes = fillPrefixes(list.Prefixes, p.Encode) @@ -71,16 +70,14 @@ func (h *handler) ListObjectsV2Handler(w http.ResponseWriter, r *http.Request) { func encodeV2(p *layer.ListObjectsParamsV2, list *layer.ListObjectsInfoV2) *ListObjectsV2Response { res := &ListObjectsV2Response{ - Name: p.Bucket, - EncodingType: p.Encode, - Prefix: s3PathEncode(p.Prefix, p.Encode), - KeyCount: len(list.Objects) + len(list.Prefixes), - MaxKeys: p.MaxKeys, - Delimiter: s3PathEncode(p.Delimiter, p.Encode), - StartAfter: s3PathEncode(p.StartAfter, p.Encode), - - IsTruncated: list.IsTruncated, - + Name: p.Bucket, + EncodingType: p.Encode, + Prefix: s3PathEncode(p.Prefix, p.Encode), + KeyCount: len(list.Objects) + len(list.Prefixes), + MaxKeys: p.MaxKeys, + Delimiter: s3PathEncode(p.Delimiter, p.Encode), + StartAfter: s3PathEncode(p.StartAfter, p.Encode), + IsTruncated: list.IsTruncated, ContinuationToken: p.ContinuationToken, NextContinuationToken: list.NextContinuationToken, }