MCPcopy Create free account
hub / github.com/git-bug/git-bug / OffsetToCursor

Function OffsetToCursor

api/graphql/connections/connections.go:21–24  ·  view source on GitHub ↗

OffsetToCursor create the cursor string from an offset

(offset int)

Source from the content-addressed store, hash-verified

19
20// OffsetToCursor create the cursor string from an offset
21func OffsetToCursor(offset int) string {
22 str := fmt.Sprintf("%v%v", cursorPrefix, offset)
23 return base64.StdEncoding.EncodeToString([]byte(str))
24}
25
26// CursorToOffset re-derives the offset from the cursor string.
27func CursorToOffset(cursor string) (int, error) {

Callers 8

CommentsMethod · 0.92
OperationsMethod · 0.92
TimelineMethod · 0.92
ActorsMethod · 0.92
ParticipantsMethod · 0.92
AllBugsMethod · 0.92
AllIdentitiesMethod · 0.92
ValidLabelsMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected