diff --git a/times.go b/times.go index d829768..dfbf3a7 100644 --- a/times.go +++ b/times.go @@ -15,6 +15,12 @@ import ( ) func times() { + since, err := tparse.AddDuration(time.Now(), "-"+*arguments.Times.since) + if err != nil { + fmt.Printf("Failed to parse time string '%s'\n", *arguments.Times.since) + os.Exit(1) + } + finished := false p := tea.NewProgram(initialIndicator("Fetching time logs...")) go func() { @@ -27,12 +33,6 @@ func times() { } }() - since, err := tparse.AddDuration(time.Now(), "-"+*arguments.Times.since) - if err != nil { - fmt.Printf("Failed to parse time string '%s'\n", *arguments.Times.since) - os.Exit(1) - } - times := getTimeLogs(since, func(repo gitea.Repository, took time.Duration) { p.Send(IndicatorInfo{ info: fmt.Sprintf("%s / %s", repo.Owner.UserName, repo.Name),