From 32f8c17174cae5084fbb83cf8df53847b1ecf23c Mon Sep 17 00:00:00 2001 From: "Frederick F. Kautz IV" Date: Sun, 1 Mar 2015 17:06:00 -0800 Subject: [PATCH] Renaming AppendUstr to AppendUniqStr --- pkg/storage/fs/fs.go | 4 ++-- pkg/utils/helpers/common.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/storage/fs/fs.go b/pkg/storage/fs/fs.go index f8ce1a2c5..892b1aa44 100644 --- a/pkg/storage/fs/fs.go +++ b/pkg/storage/fs/fs.go @@ -379,7 +379,7 @@ func (storage *storage) ListObjects(bucket string, resources mstorage.BucketReso } metadataList = append(metadataList, metadata) case delimited != "": - resources.CommonPrefixes = helpers.AppendUstr(resources.CommonPrefixes, delimited) + resources.CommonPrefixes = helpers.AppendUniqStr(resources.CommonPrefixes, delimited) } case resources.Delimiter != "" && strings.HasPrefix(name, resources.Prefix): delimited := delimiter(name, resources.Delimiter) @@ -394,7 +394,7 @@ func (storage *storage) ListObjects(bucket string, resources mstorage.BucketReso } metadataList = append(metadataList, metadata) case delimited != "": - resources.CommonPrefixes = helpers.AppendUstr(resources.CommonPrefixes, delimited) + resources.CommonPrefixes = helpers.AppendUniqStr(resources.CommonPrefixes, delimited) } case strings.HasPrefix(name, resources.Prefix): metadata := mstorage.ObjectMetadata{ diff --git a/pkg/utils/helpers/common.go b/pkg/utils/helpers/common.go index da420a4ae..242f55df0 100644 --- a/pkg/utils/helpers/common.go +++ b/pkg/utils/helpers/common.go @@ -40,7 +40,7 @@ func AppendUniqInt(slice []int, i int) []int { return append(slice, i) } -func AppendUstr(slice []string, i string) []string { +func AppendUniqStr(slice []string, i string) []string { for _, ele := range slice { if ele == i { return slice