Documentation
¶
Overview ¶
Package update provides version checking and self-update functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPeriodically ¶
CheckPeriodically checks for updates at most once per day. Returns a notice string if an update is available, empty string otherwise. This is designed to be called at the start of common commands.
func Update ¶
Update downloads and installs the latest version. Returns an error if installed via Homebrew (user should use brew upgrade).
func UpdateInstructions ¶
func UpdateInstructions(method InstallMethod) string
UpdateInstructions returns instructions for updating based on install method.
Types ¶
type InstallMethod ¶
type InstallMethod int
InstallMethod represents how tk was installed.
const ( // InstallUnknown means we couldn't determine the install method. InstallUnknown InstallMethod = iota // InstallHomebrew means tk was installed via Homebrew. InstallHomebrew // InstallScript means tk was installed via shell script or go install. InstallScript )
func DetectInstallMethod ¶
func DetectInstallMethod() InstallMethod
DetectInstallMethod determines how tk was installed by examining the binary path.
func (InstallMethod) String ¶
func (m InstallMethod) String() string
Click to show internal directories.
Click to hide internal directories.