From 66b0ca31217d7fb335b47a354718d3e68a08ad64 Mon Sep 17 00:00:00 2001 From: WAKAYAMA Shirou Date: Fri, 14 Jul 2017 15:33:53 +0900 Subject: [PATCH] [disk] Add comment to disk.Usage(). --- disk/disk_unix.go | 3 +++ 1 file changed, 3 insertions(+) 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)