Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvNoUpdateCheck = "TEAMCITY_NO_UPDATE" CheckInterval = 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func CheckInBackground ¶
CheckInBackground starts an update check in a goroutine and returns a function that, when called, waits briefly for the result and prints a one-line notice if a new version is available. The wait is bounded so slow networks don't delay command exit.
func IsDisabled ¶
func IsDisabled() bool
func PrintNotice ¶
func PrintNotice(w io.Writer, currentVersion string, r *ReleaseInfo)
Types ¶
type InstallMethod ¶
type InstallMethod int
const ( InstallUnknown InstallMethod = iota InstallHomebrew InstallApt InstallRPM InstallArch InstallScoop InstallChocolatey InstallWinGet InstallNPM InstallGoInstall InstallScript )
func DetectInstallMethod ¶
func DetectInstallMethod() InstallMethod
func (InstallMethod) String ¶
func (m InstallMethod) String() string
func (InstallMethod) UpdateCommand ¶
func (m InstallMethod) UpdateCommand() string
type ReleaseInfo ¶
func Check ¶
func Check(ctx context.Context) *ReleaseInfo
Check fetches the latest release (respecting the 24h throttle) and returns it if it's newer than the running version. Returns nil otherwise.
func LatestRelease ¶
func LatestRelease(ctx context.Context) (*ReleaseInfo, error)
Click to show internal directories.
Click to hide internal directories.