Documentation
¶
Index ¶
- Constants
- func CheckInBackground(ctx context.Context, w io.Writer, quiet bool) func()
- func IsCI() bool
- func IsDisabled() bool
- func IsNewer(current, latest string) bool
- func PrintNotice(w io.Writer, currentVersion string, r *ReleaseInfo)
- func SaveState(s *State)
- type InstallMethod
- type ReleaseInfo
- type State
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 waits briefly for the result and prints a one-line notice if a new version is available.
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.