From 5fffe7c603a6f55c05b3e2ccf55310af6dab6217 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (europa)" Date: Mon, 1 Jun 2015 23:24:51 +0100 Subject: Fix display --- Makefile | 2 +- gotop/main.go | 2 +- utils/utils.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 66a1091..d1f637b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ install: go install github.com/buetow/gotop/gotop run: - go run gotop/main.go + go run gotop/main.go -m=2 docu: install sh -c '($(GOPATH)/bin/gotop -h 2>&1)|sed 1d > help.txt;exit 0' cross: diff --git a/gotop/main.go b/gotop/main.go index 470d616..7f8e96a 100644 --- a/gotop/main.go +++ b/gotop/main.go @@ -211,7 +211,7 @@ func parseFlags() { interF := flag.Int("i", 1, "Update interval in seconds") config.binary = flag.Bool("b", false, "Use binary instead of decimal (e.g. kiB an not kB)") - config.mode = flag.Int("m", 1, "The stats mode: 0:bytes 1:syscalls 2:chars") + config.mode = flag.Int("m", 0, "The stats mode: 0:bytes 1:syscalls 2:chars") flag.Parse() diff --git a/utils/utils.go b/utils/utils.go index 1529136..fa8e3d9 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -30,7 +30,7 @@ func Abs(x int) int { } func Human(x int) string { - units := []string{" ", "k", "M", "G", "T", "P", "E", "Z", "Y"} + units := []string{"", "k", "M", "G", "T", "P", "E", "Z", "Y"} f := float32(x) i := 0 @@ -43,7 +43,7 @@ func Human(x int) string { } func HumanBinary(x int) string { - units := []string{" ", "k", "M", "G", "T", "P", "E", "Z", "Y"} + units := []string{"", "k", "M", "G", "T", "P", "E", "Z", "Y"} f := float32(x) i := 0 -- cgit v1.2.3