fix(times): Don't start bubbletea table if time log slice is empty (fix #15)
This commit is contained in:
parent
df48225954
commit
d434ff273b
12
times.go
12
times.go
@ -39,12 +39,16 @@ func times() {
|
|||||||
duration: took,
|
duration: took,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
p.Send(IndicatorInfo{
|
|
||||||
info: "Done!",
|
|
||||||
quitting: true,
|
|
||||||
})
|
|
||||||
finished = true
|
finished = true
|
||||||
|
p.Send(IndicatorInfo{info: "Done", quitting: true})
|
||||||
p.Quit()
|
p.Quit()
|
||||||
|
p.Wait()
|
||||||
|
|
||||||
|
if len(times) == 0 {
|
||||||
|
fmt.Printf("No time logs found for the specified date!\n")
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
|
||||||
var total_time time.Duration
|
var total_time time.Duration
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user