Fix float64 casting
This commit is contained in:
parent
b99342a9ce
commit
699deed6c6
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue