From 312bfa02883ae09203294fd389ddcf852e89bdc7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 25 Dec 2018 19:01:04 -0500 Subject: Improve diagnostic output a touch This change has been sitting here uncommited for a while: $ stat main.go File: main.go Size: 3987 Blocks: 8 IO Block: 4096 regular file Device: fe20h/65056d Inode: 26644471 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 1000/ luke) Gid: ( 100/ users) Access: 2018-12-25 18:56:25.283231145 -0500 Modify: 2018-04-18 20:50:38.291681635 -0400 Change: 2018-04-18 20:50:38.291681635 -0400 Birth: - --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 2378b8c..2e9c799 100644 --- a/main.go +++ b/main.go @@ -148,9 +148,9 @@ func watch(d time.Duration) { if len(line) > 70 { line = line[:67] + "..." } - fmt.Fprintf(os.Stderr, "\r%-70s", line) + fmt.Fprintf(os.Stderr, "%-70s\r", line) case jobs := <-done: - fmt.Fprintf(os.Stderr, "\r%-70s\n", "done") + fmt.Fprintf(os.Stderr, "%-70s\n", "done") s := newSortHelper(jobs) sort.Sort(s) for _, job := range s.StringSlice { -- cgit v1.2.3-54-g00ecf