semver

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package semver wraps golang.org/x/mod/semver, relaxing the requirement for semantic versions to be prefixed with "v".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(v, w string) int

func IsValid

func IsValid(s string) bool

func Sort

func Sort(list []string)

Types

type ByVersion

type ByVersion []string

ByVersion implements sort.Interface for sorting semantic version strings.

func (ByVersion) Len

func (vs ByVersion) Len() int

func (ByVersion) Less

func (vs ByVersion) Less(i, j int) bool

func (ByVersion) Swap

func (vs ByVersion) Swap(i, j int)

Jump to

Keyboard shortcuts

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