version

package
v0.0.0-...-210767f Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Before

func Before(v, v2 string) bool

Before reports whether v < v2, where v and v2 are unprefixed semantic versions.

func Canonical

func Canonical(v string) string

Canonical returns the canonical, unprefixed form of the version v, which should be an unprefixed semantic version. Unlike semver.Canonical, this function preserves build tags.

func IsCommitHash

func IsCommitHash(v string) bool

func IsValid

func IsValid(v string) bool

IsValid reports whether v is a valid unprefixed semantic version.

func Major

func Major(v string) string

Major returns the major version (e.g. "v2") of the unprefixed semantic version v.

func TrimPrefix

func TrimPrefix(v string) string

TrimPrefix removes the 'v' or 'go' prefix from the given semantic version v.

Types

This section is empty.

Jump to

Keyboard shortcuts

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