resolve linter complaints
1 file changed, 4 insertions(+), 4 deletions(-)
changed files
M git/diff.go → git/diff.go
@@ -46,7 +46,7 @@ Diff []Diff } // DiffFile returns a diff for a specific file in the current commit -func (g *GitRepo) DiffFile(filePath string) (*NiceDiff, error) { +func (g *Repo) DiffFile(filePath string) (*NiceDiff, error) { niceDiff, err := g.Diff() if err != nil { return nil, err@@ -100,7 +100,7 @@ Diff: filteredDiffs, }, nil } -func (g *GitRepo) Diff() (*NiceDiff, error) { +func (g *Repo) Diff() (*NiceDiff, error) { c, err := g.r.CommitObject(g.h) if err != nil { return nil, fmt.Errorf("commit object: %w", err)@@ -162,9 +162,9 @@ }) for _, l := range tf.Lines { switch l.Op { case gitdiff.OpAdd: - nd.Stat.Insertions += 1 + nd.Stat.Insertions++ case gitdiff.OpDelete: - nd.Stat.Deletions += 1 + nd.Stat.Deletions++ } } }