The error message :
cannot use (func(c *object.Commit) error literal) (value of type func(c *"github.com/go-git/go-git/plumbing/object".Commit) error) as func(*"github.com/go-git/go-git/v5/plumbing/object".Commit) error value in argument to iterator.ForEach
The code which has error:
err = iterator.ForEach(func(c *object.Commit) error {
daysAgo := countDaysSinceDate(c.Author.When) + offset
if c.Author.Email != email {
return nil
}
if daysAgo != outOfRange {
commits[daysAgo]++
}
return nil
})
I was using the go-get package in the project but idk why this error is coming