Skip to content

Commit a57e321

Browse files
committed
More linting cleanup
1 parent 5abbf31 commit a57e321

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

report/report.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ func Status(n note.CommitNote, options OutputOptions, projPath ...string) (strin
9797
return b.String(), nil
9898
}
9999

100+
// CommitSummry returns the commit summary report
100101
func CommitSummary(projects []ProjectCommits, options OutputOptions) (string, error) {
101102
notes := options.limitNotes(retrieveNotes(projects, options.TerminalOff, "Mon Jan 02"))
102103
if len(notes) == 0 {

util/date.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
// This allows for manipulating system time during testing
1616
var Now = func() time.Time { return time.Now() }
1717

18-
// DataRange creates predefined date ranges and validates if dates are within the range
18+
// DateRange creates predefined date ranges and validates if dates are within the range
1919
type DateRange struct {
2020
Start time.Time
2121
End time.Time
@@ -32,14 +32,14 @@ func (d DateRange) String() string {
3232
}
3333

3434
// Within determines if a date is within the date range
35-
func (r DateRange) Within(t time.Time) bool {
35+
func (d DateRange) Within(t time.Time) bool {
3636
switch {
37-
case !r.Start.IsZero() && !r.End.IsZero():
38-
return t.Equal(r.Start) || t.Equal(r.End) || (t.After(r.Start) && t.Before(r.End))
39-
case !r.Start.IsZero():
40-
return t.Equal(r.Start) || t.After(r.Start)
41-
case !r.End.IsZero():
42-
return t.Equal(r.End) || t.Before(r.End)
37+
case !d.Start.IsZero() && !d.End.IsZero():
38+
return t.Equal(d.Start) || t.Equal(d.End) || (t.After(d.Start) && t.Before(d.End))
39+
case !d.Start.IsZero():
40+
return t.Equal(d.Start) || t.After(d.Start)
41+
case !d.End.IsZero():
42+
return t.Equal(d.End) || t.Before(d.End)
4343
default:
4444
return false
4545
}

0 commit comments

Comments
 (0)