forked from rosa/hakurei
cmd/mbf: improve title format
This is cleaner for long-running daemon processes, and the additional information is more intuitive. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
+6
-2
@@ -136,15 +136,19 @@ func (cache *cache) open() (err error) {
|
||||
var n, nc uint64
|
||||
for enter := range notify {
|
||||
if enter {
|
||||
n++
|
||||
nc++
|
||||
} else {
|
||||
nc--
|
||||
n++
|
||||
}
|
||||
|
||||
if nc == 0 {
|
||||
writeTitle(cache.msg, prefix[:len(prefix)-1])
|
||||
continue
|
||||
}
|
||||
writeTitle(cache.msg, prefix+
|
||||
"("+strconv.FormatUint(nc, 10)+
|
||||
" of "+strconv.FormatUint(n, 10)+")")
|
||||
" running, "+strconv.FormatUint(n, 10)+" complete)")
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user