Documentation ¶
Index ¶
- Variables
- func Current() string
- func GetGitCommit() string
- func GetVersion() string
- func GetVersionDetails() string
- func IsCurrentVersionValid(v string) bool
- func IsDesiredVersionValid(v string) bool
- func IsNotVersioned(given string) bool
- func IsVersioned(given string) bool
- func WithSuffix(given string) (suffixed string)
- func WithSuffixIf(given string, p func(string) bool) (suffixed string)
- func WithSuffixesIf(given []string, p func(string) bool) (suffixed []string)
Constants ¶
This section is empty.
Variables ¶
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 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 ¶
IsCurrentVersionValid verifies if the current version is valid or not
func IsDesiredVersionValid ¶
IsDesiredVersionValid verifies the desired version is valid or not
func IsNotVersioned ¶
IsNotVersioned returns true if the given string does not have version as its suffix
func IsVersioned ¶
IsVersioned returns true if the given string has version as its suffix
func WithSuffix ¶
WithSuffix appends current version to the provided string
func WithSuffixIf ¶
WithSuffixIf appends current version to the provided string if given predicate succeeds
Types ¶
This section is empty.