filter

package
v0.5.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFilters

func ApplyFilters(versions []models.Version, filters ...FilterFunc) (models.VersionSlice, error)

func GetHighestStreamVersion

func GetHighestStreamVersion(versions []models.Version, streamPattern models.VersionPattern) (models.Version, error)

func GetHighestStreamVersionWithReleases

func GetHighestStreamVersionWithReleases(versions []models.Version, streamPattern models.VersionPattern) (models.Version, error)

GetHighestStreamVersionWithReleases returns the highest version from a list of versions that match a given stream pattern, including matching prerelease and all release versions.

func GetValidVersions

func GetValidVersions(stringVersionsList ...string) []models.Version

GetValidVersions returns a list of valid versions from one or more string lists of versions The versions are split by comma or space and then parsed into a Version struct

Types

type FilterFunc

type FilterFunc func(versions []models.Version) ([]models.Version, error)

func BuildMetadataFilter

func BuildMetadataFilter(pattern models.BuildMetadataPattern) FilterFunc

func Highest

func Highest() FilterFunc

func PrereleasePatternFilter

func PrereleasePatternFilter(pattern models.PRVersionPattern) FilterFunc

PrereleasePatternFilter returns a filter function that filters versions based on a PrereleasePattern prerelease versions are returned all release versions are also returned

func ReleasePatternFilter

func ReleasePatternFilter(pattern models.ReleasePattern) FilterFunc

ReleasePatternFilter returns a filter function that filters versions based on a ReleasePattern all release and prelease versions are returned

func VersionPatternFilter

func VersionPatternFilter(pattern models.VersionPattern) FilterFunc

VersionPatternFilter returns a filter function that filters versions based on a VersionPattern

Jump to

Keyboard shortcuts

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