github

package
v0.0.0-...-8840cb8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMinVersion = "go1.10" // Default minimum version
)
View Source
const (
	OverallTimeout = 5 * time.Minute // 整体操作超时
)

Variables

This section is empty.

Functions

func FetchTags

func FetchTags(existingTags map[string]bool, options ...Option) ([]string, error)

FetchTags fetches tags from golang/go repository with options and early stop support existingTags is a map of tag names that already exist locally, used for early stopping Returns fetched tags and any error encountered. Even if an error occurs, all successfully fetched tags are returned.

Types

type FetchOptions

type FetchOptions struct {
	MinVersion  string // Minimum version (e.g., "go1.22"), default is "go1.10"
	MinYear     int    // Minimum year (e.g., 2020)
	AllVersions bool   // Fetch all versions (default: false, respects MinVersion/MinYear)
}

FetchOptions contains options for fetching tags

type Option

type Option func(*FetchOptions)

Option is a function that modifies FetchOptions

func WithAllVersions

func WithAllVersions() Option

WithAllVersions fetches all versions regardless of filters

func WithMinVersion

func WithMinVersion(v string) Option

WithMinVersion sets the minimum version to fetch

func WithMinYear

func WithMinYear(year int) Option

WithMinYear sets the minimum year to fetch versions from

Jump to

Keyboard shortcuts

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