Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PerformUpdate ¶ added in v0.3.0
PerformUpdate performs the update using the detected installation method
Types ¶
type InstallMethod ¶ added in v0.3.0
type InstallMethod string
InstallMethod represents how octrafic was installed
const ( MethodHomebrew InstallMethod = "homebrew" MethodYay InstallMethod = "yay" MethodParu InstallMethod = "paru" MethodDeb InstallMethod = "deb" MethodRPM InstallMethod = "rpm" MethodScript InstallMethod = "script" MethodManual InstallMethod = "manual" MethodUnknown InstallMethod = "unknown" )
func DetectInstallationMethod ¶ added in v0.3.0
func DetectInstallationMethod() InstallMethod
DetectInstallationMethod detects how octrafic was installed
type ReleaseEntry ¶ added in v0.4.0
ReleaseEntry holds information about a single release
func FetchReleaseNotes ¶
func FetchReleaseNotes(count int) ([]ReleaseEntry, error)
FetchReleaseNotes fetches the latest `count` releases, returned oldest-first
type UpdateInfo ¶
type UpdateInfo struct {
CurrentVersion string
LatestVersion string
ReleaseNotes string
HTMLURL string
IsNewer bool
}
UpdateInfo holds information about available updates
func CheckLatestVersion ¶
func CheckLatestVersion(currentVersion string) (*UpdateInfo, error)
CheckLatestVersion checks GitHub for the latest release and compares with current version
Click to show internal directories.
Click to hide internal directories.