semver

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find added in v1.1.0

func Find(prefix string, suffix string, versions []string) (found string, err error)

Find finds the biggest valid semver version in a slice of strings. The initial order of the versions does not matter. Returns the biggest valid semver version if found, otherwise an error stating no valid semver version has been found.

func Parse

func Parse(prefix string, suffix string, version string) (blangsemver.Version, error)

Parse parses a version string into a semver version struct. It tolerates certain version specifications that do not strictly adhere to semver specs. See the library documentation for more information. Returns the parsed blang/semver/v4 Version.

func Trim

func Trim(prefix string, suffix string, version string) (string, error)

Trim trims a semver version string of anything but major.minor.patch information. Returns the trimmed semver version.

Types

type Map

type Map map[string][]string

Map a type to keep things shorter and more readable.

Jump to

Keyboard shortcuts

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