Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { GitVersion string `json:"gitVersion"` GitCommit string `json:"gitCommit"` GitTreeState string `json:"gitTreeState"` BuildDate string `json:"buildDate"` GoVersion string `json:"goVersion"` Compiler string `json:"compiler"` Platform string `json:"platform"` }
Info contains versioning information.
type ReleaseVersion ¶ added in v1.0.2
type ReleaseVersion struct {
*utilversion.Version
}
ReleaseVersion represents a released version.
func ParseGitVersion ¶ added in v1.0.2
func ParseGitVersion(gitVersion string) (*ReleaseVersion, error)
ParseGitVersion parses a git version string, such as: - v1.1.0-73-g7e6d4f69 - v1.1.0
func (*ReleaseVersion) FirstMinorRelease ¶ added in v1.0.2
func (r *ReleaseVersion) FirstMinorRelease() string
FirstMinorRelease returns the minor release but the patch releases always be 0(vx.y.0). e.g: - v1.2.1-12-g2eb92858 --> v1.2.0 - v1.2.3-12-g2e860210 --> v1.2.0
func (*ReleaseVersion) PatchRelease ¶ added in v1.0.2
func (r *ReleaseVersion) PatchRelease() string
PatchRelease returns the stable version with format "vx.y.z".
Click to show internal directories.
Click to hide internal directories.