version

package
v0.33.0-geaaru Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Versioner

type Versioner interface {
	Sanitize(string) string
	Validate(string) error
	Sort([]string) []string

	ValidateSelector(version string, selector string) bool
}

Versioner is responsible of sanitizing versions, validating them and ordering by precedence

func DefaultVersioner

func DefaultVersioner() Versioner

type WrappedVersioner

type WrappedVersioner struct{}

WrappedVersioner uses different means to return unique result that is understendable by Luet It tries different approaches to sort, validate, and sanitize to a common versioning format that is understendable by the whole code

func (*WrappedVersioner) Sanitize

func (w *WrappedVersioner) Sanitize(s string) string

func (*WrappedVersioner) Sort

func (w *WrappedVersioner) Sort(toSort []string) []string

func (*WrappedVersioner) Validate

func (w *WrappedVersioner) Validate(version string) error

func (*WrappedVersioner) ValidateSelector

func (w *WrappedVersioner) ValidateSelector(vv string, selector string) bool

Jump to

Keyboard shortcuts

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