NumBlines returns the total number of Blines source code in the patch
()
| 112 | |
| 113 | // NumBlines returns the total number of Blines source code in the patch |
| 114 | func (pt Patch) NumBlines() int { |
| 115 | nl := 0 |
| 116 | for _, pr := range pt { |
| 117 | nl += len(pr.Blines) |
| 118 | } |
| 119 | return nl |
| 120 | } |
| 121 | |
| 122 | // ToPatch creates a Patch list from given Diffs output from DiffLines and the |
| 123 | // b strings from which the needed lines of source are copied. |