version

package
v0.0.0-...-8c9613c Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: BSD-3-Clause, CC-BY-4.0 Imports: 3 Imported by: 0

Documentation

Overview

Package version provides shared utilities for manipulating Go semantic versions with no prefix.

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