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

Function tagForeachCallback

tag.go:208–222  ·  view source on GitHub ↗

export tagForeachCallback

(name *C.char, id *C.git_oid, handle unsafe.Pointer)

Source from the content-addressed store, hash-verified

206
207//export tagForeachCallback
208func tagForeachCallback(name *C.char, id *C.git_oid, handle unsafe.Pointer) C.int {
209 payload := pointerHandles.Get(handle)
210 data, ok := payload.(*tagForeachCallbackData)
211 if !ok {
212 panic("could not retrieve tag foreach CB handle")
213 }
214
215 err := data.callback(C.GoString(name), newOidFromC(id))
216 if err != nil {
217 *data.errorTarget = err
218 return C.int(ErrorCodeUser)
219 }
220
221 return C.int(ErrorCodeOK)
222}
223
224// Foreach calls the callback for each tag in the repository.
225func (c *TagsCollection) Foreach(callback TagForeachCallback) error {

Callers

nothing calls this directly

Calls 2

newOidFromCFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…