(index int)
| 148 | } |
| 149 | |
| 150 | func (diff *Diff) Delta(index int) (DiffDelta, error) { |
| 151 | if diff.ptr == nil { |
| 152 | return DiffDelta{}, ErrInvalid |
| 153 | } |
| 154 | ptr := C.git_diff_get_delta(diff.ptr, C.size_t(index)) |
| 155 | ret := diffDeltaFromC(ptr) |
| 156 | runtime.KeepAlive(diff) |
| 157 | return ret, nil |
| 158 | } |
| 159 | |
| 160 | // deprecated: You should use `Diff.Delta()` instead. |
| 161 | func (diff *Diff) GetDelta(index int) (DiffDelta, error) { |
no test coverage detected