Documentation
¶
Index ¶
- func Check(ctx context.Context, sink output.Sink, githubToken string) (string, bool, error)
- func CheckQuietly(ctx context.Context, githubToken string) (current, latest string, available bool)
- func NotifyUpdate(ctx context.Context, sink output.Sink, opts NotifyOptions) (exitAfter bool)
- func Update(ctx context.Context, sink output.Sink, checkOnly bool, githubToken string) error
- type InstallInfo
- type InstallMethod
- type NotifyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check reports whether a newer version is available. Returns the latest version string and true if an update is available.
func CheckQuietly ¶ added in v0.5.2
func NotifyUpdate ¶ added in v0.5.2
Types ¶
type InstallInfo ¶
type InstallInfo struct {
Method InstallMethod
ResolvedPath string
}
InstallInfo holds the detected install method and the resolved binary path.
func DetectInstallMethod ¶
func DetectInstallMethod() InstallInfo
DetectInstallMethod determines how lstk was installed by inspecting the resolved path of the running binary.
type InstallMethod ¶
type InstallMethod int
const ( InstallBinary InstallMethod = iota // standalone binary download InstallHomebrew // installed via Homebrew cask InstallNPM // installed via npm )
func (InstallMethod) String ¶
func (m InstallMethod) String() string
type NotifyOptions ¶ added in v0.5.2
Click to show internal directories.
Click to hide internal directories.