add mem% as sortable field

This commit is contained in:
Bradley Cicenas
2017-01-06 12:02:56 +00:00
parent d5e4782839
commit 6d63d09c83
5 changed files with 31 additions and 24 deletions

View File

@@ -2,7 +2,6 @@ package widgets
import (
"fmt"
"math"
"strconv"
ui "github.com/gizak/termui"
@@ -30,10 +29,6 @@ func byteFormat(n int64) string {
return fmt.Sprintf("%sG", strconv.FormatInt(n, 10))
}
func round(num float64) int {
return int(num + math.Copysign(0.5, num))
}
func compactPar(s string) *ui.Par {
p := ui.NewPar(s)
p.Border = false