Skip to content

Commit

Permalink
fix warning when using leave time arg
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreitf1 committed Jan 10, 2025
1 parent 26ef407 commit aff1584
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func process() error {

stdio.Debug("entry count: %d", len(entries))
if len(entries) > 0 {
currentState = entries[len(entries)-1].Type

if len(*argLeaveTime) > 0 {
t, err := time.Parse("15:04", *argLeaveTime)
if err != nil {
Expand All @@ -153,8 +155,6 @@ func process() error {
} else if entry.Type == EntryTypeTrip {
stdio.Println(" %s<-- %s DG%s", colors.TripEntry, entry.Time.Format("15:04"), colorEnd)
}

currentState = entry.Type
}

workTime, startTime, breakTime, err := ComputeWorkTime(entries)
Expand Down

0 comments on commit aff1584

Please sign in to comment.