(index int)
| 84 | } |
| 85 | |
| 86 | func (statusList *StatusList) ByIndex(index int) (StatusEntry, error) { |
| 87 | if statusList.ptr == nil { |
| 88 | return StatusEntry{}, ErrInvalid |
| 89 | } |
| 90 | ptr := C.git_status_byindex(statusList.ptr, C.size_t(index)) |
| 91 | if ptr == nil { |
| 92 | return StatusEntry{}, errors.New("index out of Bounds") |
| 93 | } |
| 94 | entry := statusEntryFromC(ptr) |
| 95 | runtime.KeepAlive(statusList) |
| 96 | |
| 97 | return entry, nil |
| 98 | } |
| 99 | |
| 100 | func (statusList *StatusList) EntryCount() (int, error) { |
| 101 | if statusList.ptr == nil { |