Leverage sort Interface to provide sortUnique function

This commit is contained in:
Harshavardhana
2015-10-23 15:54:47 -07:00
parent 9476e0b374
commit 53adfb38f4
2 changed files with 18 additions and 12 deletions

View File

@@ -21,6 +21,7 @@ import (
"os"
"path/filepath"
"runtime"
"sort"
"strings"
"github.com/minio/minio-xl/pkg/probe"
@@ -356,6 +357,6 @@ func (fs Filesystem) filterObjects(bucket string, content contentInfo, resources
return ObjectMetadata{}, resources, err.Trace()
}
}
sortUnique(resources.CommonPrefixes)
sortUnique(sort.StringSlice(resources.CommonPrefixes))
return metadata, resources, nil
}