Hunk represents one @@ ... @@ block in a unified diff.
| 23 | |
| 24 | // Hunk represents one @@ ... @@ block in a unified diff. |
| 25 | type Hunk struct { |
| 26 | OldStart int // starting line in the old file (1-indexed) |
| 27 | OldCount int // number of lines in the old file |
| 28 | NewStart int // starting line in the new file (1-indexed) |
| 29 | NewCount int // number of lines in the new file |
| 30 | Lines []HunkLine // all lines in sequence |
| 31 | } |
| 32 | |
| 33 | var hunkHeaderRe = regexp.MustCompile(`^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@`) |
| 34 |
nothing calls this directly
no outgoing calls
no test coverage detected