Merge pull request #243 from fkautz/pr_out_renaming_appendustr_to_appenduniqstr

master
Frederick F. Kautz IV 10 years ago
commit 022b89dd9b
  1. 4
      pkg/storage/fs/fs.go
  2. 2
      pkg/utils/helpers/common.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{

@ -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

Loading…
Cancel
Save