diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2024-10-15 13:42:12 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2024-10-15 13:42:12 +0200 |
| commit | 84c1da510897f945097d6a06d9df2da38d0abb9d (patch) | |
| tree | 041e52488eb17dbf725c8182db8fe98bfda3fff7 /cmd/kdev/main.go | |
| parent | cdeff3519111f923d68cf0b501d80e00782eaa7c (diff) | |
fix(kdev): Pass by referencev0.5.4
Diffstat (limited to 'cmd/kdev/main.go')
| -rw-r--r-- | cmd/kdev/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/kdev/main.go b/cmd/kdev/main.go index f639716..bbf06d7 100644 --- a/cmd/kdev/main.go +++ b/cmd/kdev/main.go @@ -72,7 +72,7 @@ func main() { kcore.Expect(err, "Error getting HEAD") head, err := repo.CommitObject(ref.Hash()) kcore.Expect(err, "Error getting commit object") - kcore.Expect(walkRepo(keywords, head, records), "Error walking directory") + kcore.Expect(walkRepo(keywords, head, &records), "Error walking directory") records = lo.Filter(records, func(record Record, index int) bool { return record.date.After(after) }) if *sortBy == "random" { @@ -86,7 +86,7 @@ func main() { } } -func walkRepo(keywords []string, head *object.Commit, records []Record) error { +func walkRepo(keywords []string, head *object.Commit, records *[]Record) error { progress := progressbar.Default(-1, "Scanning") return filepath.WalkDir(*repoPath, func(path string, d fs.DirEntry, err error) error { relativePath := strings.TrimPrefix(path, *repoPath) @@ -106,7 +106,7 @@ func walkRepo(keywords []string, head *object.Commit, records []Record) error { } if !d.IsDir() { kcore.Expect(progress.Add(1), "Error incrementing progress") - return processFile(*repoPath, relativePath, keywords, &records, head) + return processFile(*repoPath, relativePath, keywords, records, head) } return nil }) |
