finish merging

This commit is contained in:
2023-01-30 23:03:08 -08:00
parent 38bc9bcf94
commit aa28e5b264
10 changed files with 49 additions and 197 deletions

View File

@@ -18,17 +18,17 @@ func NewCommit(Author, Message, Repo, Path string, LOC int) Commit {
}
}
func (yf YearFreq) String() string {
func (yf Freq) String() string {
return gterm.GetYearUnicode(yf)
}
func (a YearFreq) Merge(b YearFreq) YearFreq {
func (a Freq) Merge(b Freq) Freq {
x := len(a)
y := len(b)
if x < y {
x = y
}
c := make(YearFreq, x)
c := make(Freq, x)
copy(c, a)
for i := 0; i < y; i++ {
c[i] += b[i]