version

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GitCommit that was compiled. This will be filled in by the compiler.
	GitCommit string

	// Version show the version number,fill in by the compiler
	Version string

	// VersionMeta is a pre-release marker for the version. If this is "" (empty string)
	// then it means that it is a final release. Otherwise, this is a pre-release
	// such as "dev" (in development), "beta", "rc1", etc.
	VersionMeta string
)

Functions

func Current

func Current() string

Current returns the current version of maya

func GetGitCommit

func GetGitCommit() string

GetGitCommit returns the Git commit SHA-1 from the global GitCommit variable. If GitCommit is unset then by calling Git directly.

func GetVersion

func GetVersion() string

GetVersion returns the current version from the global Version variable. If Version is unset then from the VERSION file at the root of the repo.

func GetVersionDetails

func GetVersionDetails() string

func IsCurrentVersionValid

func IsCurrentVersionValid(v string) bool

IsCurrentVersionValid verifies if the current version is valid or not

func IsDesiredVersionValid

func IsDesiredVersionValid(v string) bool

IsDesiredVersionValid verifies the desired version is valid or not

func IsNotVersioned

func IsNotVersioned(given string) bool

IsNotVersioned returns true if the given string does not have version as its suffix

func IsVersioned

func IsVersioned(given string) bool

IsVersioned returns true if the given string has version as its suffix

func WithSuffix

func WithSuffix(given string) (suffixed string)

WithSuffix appends current version to the provided string

func WithSuffixIf

func WithSuffixIf(given string, p func(string) bool) (suffixed string)

WithSuffixIf appends current version to the provided string if given predicate succeeds

func WithSuffixesIf

func WithSuffixesIf(given []string, p func(string) bool) (suffixed []string)

WithSuffixesIf appends current version to the provided strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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