diff --git a/disk/disk_unix.go b/disk/disk_unix.go index 8c6472d..8520829 100644 --- a/disk/disk_unix.go +++ b/disk/disk_unix.go @@ -4,6 +4,9 @@ package disk import "golang.org/x/sys/unix" +// Usage returns a file system usage. path is a filessytem path such +// as "/", not device file path like "/dev/vda1". If you want to use +// a return value of disk.Partitions, use "Mountpoint" not "Device". func Usage(path string) (*UsageStat, error) { stat := unix.Statfs_t{} err := unix.Statfs(path, &stat)