Skip to content

Commit

Permalink
Add comments (golint)
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Jul 26, 2020
1 parent 1f754ac commit 543afa6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parser/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ import (

var _ Parser = &DiffParser{}

// DiffParser is a unified diff parser.
type DiffParser struct {
strip int
wd string
}

// NewDiffParser creates a new DiffParser.
func NewDiffParser(strip int) *DiffParser {
p := &DiffParser{strip: strip}
p.wd, _ = os.Getwd()
return p
}

// Parse parses input as unified diff format and return it as diagnostics.
func (p *DiffParser) Parse(r io.Reader) ([]*rdf.Diagnostic, error) {
filediffs, err := diff.ParseMultiFile(r)
if err != nil {
Expand Down

0 comments on commit 543afa6

Please sign in to comment.