versions

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewVersion

func NewVersion(v string) (*version.Version, error)

NewVersion some older versions in wolfi contain an underscore to separate pre-release

Types

type ByLatest

type ByLatest []*version.Version

func (ByLatest) Len

func (u ByLatest) Len() int

func (ByLatest) Less

func (u ByLatest) Less(i, j int) bool

func (ByLatest) Swap

func (u ByLatest) Swap(i, j int)

type ByLatestStrings

type ByLatestStrings []string

ByLatestStrings is like ByLatest but lets the user pass in strings instead of Version objects.

func (ByLatestStrings) Len

func (by ByLatestStrings) Len() int

func (ByLatestStrings) Less

func (by ByLatestStrings) Less(i, j int) bool

func (ByLatestStrings) Swap

func (by ByLatestStrings) Swap(i, j int)

type Interface

type Interface interface {
	// Len is the number of elements in the collection.
	Len() int

	// Less reports whether the element with index i must sort before the element with index j.
	// If both Less(i, j) and Less(j, i) are false, then the elements at index i and j are considered equal.
	Less(i, j int) bool

	// Swap swaps the elements with indexes i and j.
	Swap(i, j int)
}

Jump to

Keyboard shortcuts

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