MCPcopy Create free account
hub / github.com/libgit2/git2go / EntryByIndex

Method EntryByIndex

index.go:458–466  ·  view source on GitHub ↗
(index uint)

Source from the content-addressed store, hash-verified

456}
457
458func (v *Index) EntryByIndex(index uint) (*IndexEntry, error) {
459 centry := C.git_index_get_byindex(v.ptr, C.size_t(index))
460 if centry == nil {
461 return nil, fmt.Errorf("Index out of Bounds")
462 }
463 ret := newIndexEntryFromC(centry)
464 runtime.KeepAlive(v)
465 return ret, nil
466}
467
468func (v *Index) EntryByPath(path string, stage int) (*IndexEntry, error) {
469 cpath := C.CString(path)

Callers

nothing calls this directly

Calls 1

newIndexEntryFromCFunction · 0.85

Tested by

no test coverage detected