Fix float64 casting

This commit is contained in:
Chevy 2018-03-26 12:16:33 -05:00 committed by GitHub
parent b99342a9ce
commit 699deed6c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
Total: tot, Total: tot,
Used: used, Used: used,
Free: free, Free: free,
UsedPercent: float64(used / tot), UsedPercent: float64(used) / float64(tot),
} }
return ret, nil return ret, nil