page

package
v0.0.0-...-902489a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Paginate

func Paginate(detail string, perPage int, fn func(listOptions github.ListOptions) (Details, *github.Response, error)) error

Paginate handles pagination according to the google/go-github API. It handles the rate limit error by waiting if it receives one. This allows the caller to handle just the business logic without having to worry about pagination. The details the caller can return control whether the function returns early.

Types

type Details

type Details struct {
	// Whether pagination should stop now at the caller's request.
	StopEarly bool
}

Details are options that the caller can return to describe how to proceed with pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL