From 48a949c41caa6dee35dea2ccdb3b32b91475362a Mon Sep 17 00:00:00 2001 From: jimi Date: Tue, 9 Feb 2016 10:20:27 -0600 Subject: [PATCH] Reformat output strings --- main.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 1c2d5bb..5de82ab 100644 --- a/main.go +++ b/main.go @@ -49,8 +49,11 @@ func main() { if err != nil { fmt.Printf("%s %s\n", name, err) } - fmt.Printf("%s %d %v\n", name, data.length, data.duration) + fmt.Printf("%-10s %6.2f KB %7.2f ms\n", + name, + float32(data.length)/1024, + float32(data.duration)/1000000) } - fmt.Printf("Total time: %v\n", time.Since(start)) + fmt.Printf("Total time: %.3f seconds\n", time.Since(start).Seconds()) }