summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (europa) <paul@buetow.org>2015-06-01 23:24:51 +0100
committerPaul Buetow (europa) <paul@buetow.org>2015-06-01 23:24:51 +0100
commit5fffe7c603a6f55c05b3e2ccf55310af6dab6217 (patch)
treed102a64d7afd21fb0a14f98beadd64e6aadb0e04
parent5d96f9cb6be59e8c2715c63053dc291940182a6b (diff)
Fix display0.1
-rw-r--r--Makefile2
-rw-r--r--gotop/main.go2
-rw-r--r--utils/utils.go4
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