Skip to content

Commit 79c8f4e

Browse files
authored
Merge pull request waigani#16 from nakabonne/public-diffRange
Make diffRange public
2 parents 1f7065f + 3eca51b commit 79c8f4e

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

diffparser.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
NEW
2424
)
2525

26-
type diffRange struct {
26+
type DiffRange struct {
2727

2828
// starting line number
2929
Start int
@@ -58,9 +58,9 @@ type DiffLine struct {
5858
// DiffHunk is a group of difflines
5959
type DiffHunk struct {
6060
HunkHeader string
61-
OrigRange diffRange
62-
NewRange diffRange
63-
WholeRange diffRange
61+
OrigRange DiffRange
62+
NewRange DiffRange
63+
WholeRange DiffRange
6464
}
6565

6666
// DiffFile is the sum of diffhunks and holds the changes of the file features
@@ -224,13 +224,13 @@ func Parse(diffString string) (*Diff, error) {
224224
}
225225

226226
// hunk orig range.
227-
hunk.OrigRange = diffRange{
227+
hunk.OrigRange = DiffRange{
228228
Start: a,
229229
Length: b,
230230
}
231231

232232
// hunk new range.
233-
hunk.NewRange = diffRange{
233+
hunk.NewRange = DiffRange{
234234
Start: c,
235235
Length: d,
236236
}

0 commit comments

Comments
 (0)