version

package
v0.0.0-...-27fb258 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version holds some version data common to patcher client and server. Most of these values will be inserted at build time with `-ldFlags` directives for official builds.

Index

Constants

This section is empty.

Variables

View Source
var (
	OfficialBuild string
	BuildBranch   string
	VersionDate   string
	VersionSHA    string
	VersionNumber string

	// BuildVersion holds the build details
	BuildVersion = BuildVersionInfo{
		Version:       VersionNumber,
		OfficialBuild: OfficialBuild,
		BuildBranch:   BuildBranch,
		VersionDate:   VersionDate,
		VersionSHA:    VersionSHA,
	}
)

Functions

func GetVersionInfo

func GetVersionInfo() string

GetVersionInfo returns a string representing the version information for the current binary.

func ShortVersion

func ShortVersion() string

ShortVersion returns a short build string, such as "2.0.0-dev"

Types

type BuildVersionInfo

type BuildVersionInfo struct {
	// Version number for official releases Updated manually before each release.
	Version string
	// Set to any non-empty value by official release script
	OfficialBuild string
	//Set the branch name that we are building here
	BuildBranch string
	// VersionDate Date and time of build. Should be in YYYYMMDDHHMMSS format
	VersionDate string
	// VersionSHA should be set at build time as the most recent commit hash.
	VersionSHA string
}

func (BuildVersionInfo) GetVersionDate

func (b BuildVersionInfo) GetVersionDate() time.Time

GetVersionDate returns a go time var from the time string

Jump to

Keyboard shortcuts

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