github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectFromScan

func CollectFromScan[T any](it iter.Seq2[T, error]) ([]T, error)

CollectFromScan collects all items and error from an Scan.

func ScanGitHubList

func ScanGitHubList[T any](
	fetchPage func(opt github.ListOptions) ([]T, *github.Response, error),
	opts ...ScanGitHubListOption,
) iter.Seq2[T, error]

ScanGitHubList iterates over paginated GitHub API list results, yielding each item. - fetchPage: function that fetches a page of results using github.ListOptions. - opts: optional functional options (e.g., WithPerPage). Returns an iterator (iter.Seq2) yielding each item and any error encountered.

Types

type ScanGitHubListOption

type ScanGitHubListOption func(*github.ListOptions)

ScanGitHubListOption defines a functional option for ScanGitHubList.

func WithPerPage

func WithPerPage(perPage int) ScanGitHubListOption

WithPerPage sets the PerPage value for pagination.

Jump to

Keyboard shortcuts

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