fix error in CommitSet to Freq func

This commit is contained in:
2023-01-30 23:45:27 -08:00
parent aa28e5b264
commit 31bb0d88c7
4 changed files with 14 additions and 30 deletions

View File

@@ -59,9 +59,6 @@ func YearFreqFromChan(cc chan types.Commit, year int) types.Freq {
}
freq := make([]int, yearLength)
for commit := range cc {
if commit.TimeStamp.Year() != year {
continue
}
freq[commit.TimeStamp.YearDay()-1]++
}
return freq
@@ -131,10 +128,11 @@ func FilterCChanByAuthor(in chan types.Commit, authors []string) (chan types.Com
}
go func() {
for commit := range in {
regset:
for _, r := range regSet {
if r.MatchString(commit.Author) {
out <- commit
break
break regset
}
}
}