(ptr *C.git_patch)
| 15 | } |
| 16 | |
| 17 | func newPatchFromC(ptr *C.git_patch) *Patch { |
| 18 | if ptr == nil { |
| 19 | return nil |
| 20 | } |
| 21 | |
| 22 | patch := &Patch{ |
| 23 | ptr: ptr, |
| 24 | } |
| 25 | |
| 26 | runtime.SetFinalizer(patch, (*Patch).Free) |
| 27 | return patch |
| 28 | } |
| 29 | |
| 30 | func (patch *Patch) Free() error { |
| 31 | if patch.ptr == nil { |
no outgoing calls
no test coverage detected
searching dependent graphs…