version

package
v1.14.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version app version
	Version = "1.14.0"
	// Revision git commit short commithash
	Revision = "xxxxxx" // set on build time

	// CopyrightYear .
	CopyrightYear = "2017-2023"
)
View Source
var GitHubReleaseInfoURL = "https://api.github.com/repos/sacloud/usacloud/releases/latest"

GitHubReleaseInfoURL リリース情報取得用のURL - ビルド時に-ldflagsで差し替えることがあるためconstではなくvarにしておく

Functions

func FullVersion

func FullVersion() string

FullVersion return usacloud full version text

Types

type GitHubRelease

type GitHubRelease struct {
	TagName string `json:"tag_name"`
	URL     string `json:"html_url"`
}

GitHubRelease GitHubのリリース情報

refs: https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-the-latest-release

func (*GitHubRelease) GreaterThanCurrent

func (r *GitHubRelease) GreaterThanCurrent() (bool, error)

type ReleaseInfo

type ReleaseInfo struct {
	Release   GitHubRelease
	FetchedAt time.Time
}

ReleaseInfo リリース情報のキャッシュ

func NewVersionReleased

func NewVersionReleased() (*ReleaseInfo, error)

func (*ReleaseInfo) Expired

func (r *ReleaseInfo) Expired() bool

Jump to

Keyboard shortcuts

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