version

package
v1.22.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunAt time.Time

Functions

func BuildTime added in v0.9.4

func BuildTime() time.Time

BuildTime gets the build time

func GitSHA added in v0.9.4

func GitSHA() string

GitSHA gets the gitsha

func IsLatestRelease added in v0.9.4

func IsLatestRelease() (bool, string, error)

IsLatestRelease queries github for the latest release in the project repo. If that release has a semver greater than the current release, it returns false and the new latest release semver. Otherwise, it returns true or error

func Version added in v0.9.4

func Version() string

Version gets the version

Types

type Build added in v0.9.4

type Build struct {
	Version      string     `json:"version,omitempty"`
	GitSHA       string     `json:"git,omitempty"`
	BuildTime    time.Time  `json:"buildTime,omitempty"`
	TimeFallback string     `json:"buildTimeFallback,omitempty"`
	GoInfo       GoInfo     `json:"go,omitempty"`
	RunAt        *time.Time `json:"runAt,omitempty"`
}

Build holds details about this build of the Ship binary

func GetBuild added in v0.9.4

func GetBuild() Build

GetBuild gets the build

type GoInfo added in v0.9.4

type GoInfo struct {
	Version  string `json:"version,omitempty"`
	Compiler string `json:"compiler,omitempty"`
	OS       string `json:"os,omitempty"`
	Arch     string `json:"arch,omitempty"`
}

Jump to

Keyboard shortcuts

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