Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version app version Version = "1.0.0-dev" // Revision git commit short commithash Revision = "xxxxxx" // set on build time // CopyrightYear . CopyrightYear = "2017-2020" )
View Source
var GitHubReleaseInfoURL = "https://api.github.com/repos/sacloud/usacloud/releases/latest"
GitHubReleaseInfoURL リリース情報取得用のURL - ビルド時に-ldflagsで差し替えることがあるためconstではなくvarにしておく
Functions ¶
Types ¶
type GitHubRelease ¶
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
Click to show internal directories.
Click to hide internal directories.