summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-04 08:11:21 +0200
committerPaul Buetow <paul@buetow.org>2026-03-04 08:11:21 +0200
commit691ce337e19e58eef288bbff0a625263ec90719e (patch)
tree9e7a624f33961a2c6d68331116a15dc3a3c03ed5
parent38a1fe52b761c717fb4d62d286b1c12add8f21ce (diff)
worktime: simplify empty slice initialization
-rw-r--r--internal/worktime/db.go2
-rw-r--r--internal/worktime/report.go1
2 files changed, 1 insertions, 2 deletions
diff --git a/internal/worktime/db.go b/internal/worktime/db.go
index e6b06f4..b406d7e 100644
--- a/internal/worktime/db.go
+++ b/internal/worktime/db.go
@@ -86,7 +86,7 @@ func LoadAll(dbDir string) ([]Entry, error) {
return nil, fmt.Errorf("glob databases in %q: %w", dbDir, err)
}
- entries := make([]Entry, 0)
+ var entries []Entry
for _, dbFile := range dbFiles {
db, err := loadDatabaseFile(dbFile)
if err != nil {
diff --git a/internal/worktime/report.go b/internal/worktime/report.go
index 246a602..cfe3001 100644
--- a/internal/worktime/report.go
+++ b/internal/worktime/report.go
@@ -407,7 +407,6 @@ func newDayAccumulator() dayAccumulator {
func newWeekAccumulator() weekAccumulator {
return weekAccumulator{
values: map[string]int64{},
- days: []DayReport{},
}
}