version

package
v0.68.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForUpdate added in v0.46.0

func CheckForUpdate() *semver.Version

func CompareAndLogVersions added in v0.46.0

func CompareAndLogVersions(newestVersionSemVar *semver.Version)

func ConvertVerToSemVar added in v0.46.0

func ConvertVerToSemVar(data VersionData) *semver.Version

func GetLatestVersion added in v0.46.0

func GetLatestVersion() (string, error)

func GetVersionDetailsHuman

func GetVersionDetailsHuman() [][]string

GetVersionDetails provides an ordered list of version info fields

func GetVersionShort

func GetVersionShort() string

GetVersionShort returns a simple, short form of the fsoc version

func IsDev

func IsDev() bool

func NewSubCmd

func NewSubCmd() *cobra.Command

Types

type VersionData

type VersionData struct {
	Version           string `yaml:"version" json:"version" human:"Version"`
	VersionMajor      uint   `yaml:"major" json:"major"`
	VersionMinor      uint   `yaml:"minor" json:"minor"`
	VersionPatch      uint   `yaml:"patch" json:"patch"`
	VersionPrerelease string `yaml:"prerelease" json:"prerelease"`
	VersionMeta       string `yaml:"metadata" json:"metadata"`
	IsDev             bool   `yaml:"dev" json:"dev" human:"Dev Build"`
	GitHash           string `yaml:"git_hash" json:"git_hash" human:"Git Hash"`
	GitBranch         string `yaml:"git_branch" json:"git_branch" human:"Git Branch"`
	GitDirty          bool   `yaml:"git_dirty" json:"git_dirty" human:"Git Dirty"`
	GitTimestamp      uint64 `yaml:"git_timestamp" json:"git_timestamp" human:"Git Timestamp"`
	BuildTimestamp    uint64 `yaml:"build_timestamp" json:"build_timestamp" human:"Build Timestamp"`
	BuildHost         string `yaml:"build_host" json:"build_host" human:"Build Host"`
	Platform          string `yaml:"platform" json:"platform" human:"Platform"`
}

func GetVersion

func GetVersion() VersionData

GetVersion returns a copy of the fsoc version details

func (VersionData) Fields

func (v VersionData) Fields() log.Fields

Fields builds the structure required by the apex/log to log the version detail fields as part of a log message

Jump to

Keyboard shortcuts

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