From 699deed6c62a0859e1ef9be33d63bcc0f3f0c37a Mon Sep 17 00:00:00 2001 From: Chevy Date: Mon, 26 Mar 2018 12:16:33 -0500 Subject: [PATCH] Fix float64 casting --- mem/mem_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mem/mem_windows.go b/mem/mem_windows.go index d40f6cf..cc9ce82 100644 --- a/mem/mem_windows.go +++ b/mem/mem_windows.go @@ -84,7 +84,7 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { Total: tot, Used: used, Free: free, - UsedPercent: float64(used / tot), + UsedPercent: float64(used) / float64(tot), } return ret, nil