(t Operation, ss ...string)
| 360 | } |
| 361 | |
| 362 | func (h *hunk) AddOp(t Operation, ss ...string) { |
| 363 | n := len(ss) |
| 364 | switch t { |
| 365 | case Add: |
| 366 | h.toCount += n |
| 367 | case Delete: |
| 368 | h.fromCount += n |
| 369 | case Equal: |
| 370 | h.toCount += n |
| 371 | h.fromCount += n |
| 372 | } |
| 373 | |
| 374 | for _, s := range ss { |
| 375 | h.ops = append(h.ops, &op{s, t}) |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | type op struct { |
| 380 | text string |
no outgoing calls
no test coverage detected