aboutsummaryrefslogtreecommitdiff
path: root/filesystem/mountpoint.go
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/mountpoint.go')
-rw-r--r--filesystem/mountpoint.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/filesystem/mountpoint.go b/filesystem/mountpoint.go
index 1fc41be..eab7592 100644
--- a/filesystem/mountpoint.go
+++ b/filesystem/mountpoint.go
@@ -139,9 +139,9 @@ func AllFilesystems() ([]*Mount, error) {
return nil, err
}
- mounts := make([]*Mount, len(mountsByPath))
- for i, mount := range mountsByPath {
- mounts[i] = mount
+ mounts := make([]*Mount, 0, len(mountsByPath))
+ for _, mount := range mountsByPath {
+ mounts = append(mounts, mount)
}
sort.Sort(PathSorter(mounts))