Rename Du() to DiskUsage() for more expressive

This commit is contained in:
Pengfei Ni
2018-05-22 10:51:26 +08:00
parent 7cbee06a00
commit 66da2ddcd0
4 changed files with 11 additions and 8 deletions

View File

@@ -56,7 +56,8 @@ func FsInfo(path string) (int64, int64, int64, int64, int64, int64, error) {
return freeBytesAvailable, totalNumberOfBytes, totalNumberOfBytes - freeBytesAvailable, 0, 0, 0, nil
}
func Du(path string) (*resource.Quantity, error) {
// DiskUsage gets disk usage of specified path.
func DiskUsage(path string) (*resource.Quantity, error) {
_, _, usage, _, _, _, err := FsInfo(path)
if err != nil {
return nil, err