info

package
v0.3.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

GetVersion returns the semver string of the version

Types

type VersionInfo

type VersionInfo struct {
	// Version is the current semver.
	Version string `yaml:"version,omitempty"`
	// GitCommit is the git sha1.
	GitCommit string `yaml:"gitCommit,omitempty"`
	// GitTreeState is the state of the git tree.
	GitTreeState string `yaml:"gitTreeState,omitempty"`
	// GoVersion is the version of the Go compiler used.
	GoVersion string `yaml:"goVersion,omitempty"`
}

VersionInfo describes the compile time information.

func GetVersionInfo

func GetVersionInfo() VersionInfo

GetVersionInfo returns version info

func (*VersionInfo) IsSameVersion

func (v *VersionInfo) IsSameVersion() bool

IsSameVersion checks if two versions are same and logs a message if the version is newer or older

Jump to

Keyboard shortcuts

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