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,
|
||||
Used: used,
|
||||
Free: free,
|
||||
UsedPercent: float64(used / tot),
|
||||
UsedPercent: float64(used) / float64(tot),
|
||||
}
|
||||
|
||||
return ret, nil
|
||||
|
|
Loading…
Reference in New Issue