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

Method Next

reference.go:434–446  ·  view source on GitHub ↗

NextName retrieves the next reference name. If the iteration is over, the returned error code is git.ErrorCodeIterOver

()

Source from the content-addressed store, hash-verified

432// NextName retrieves the next reference name. If the iteration is over,
433// the returned error code is git.ErrorCodeIterOver
434func (v *ReferenceNameIterator) Next() (string, error) {
435 var ptr *C.char
436
437 runtime.LockOSThread()
438 defer runtime.UnlockOSThread()
439
440 ret := C.git_reference_next_name(&ptr, v.ptr)
441 if ret < 0 {
442 return "", MakeGitError(ret)
443 }
444
445 return C.GoString(ptr), nil
446}
447
448// Next retrieves the next reference. If the iterationis over, the
449// returned error code is git.ErrorCodeIterOver

Callers

nothing calls this directly

Calls 1

MakeGitErrorFunction · 0.85

Tested by

no test coverage detected