Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "v0.0.0" BuildTime = "1706890000" BuildGoVersion = "unknown" )
Functions ¶
func FormatedVersion ¶
func FormatedVersion() string
Types ¶
type DownloadProgress ¶
type DownloadProgress struct {
Err error
// contains filtered or unexported fields
}
DownloadCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
func (*DownloadProgress) Done ¶
func (dp *DownloadProgress) Done()
func (*DownloadProgress) Progress ¶
func (dp *DownloadProgress) Progress() chan float32
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
Downloader check and download the latest version of TPIX CLI.
func (*Downloader) Download ¶
func (d *Downloader) Download(onFinished func()) *DownloadProgress
Download downloads the release file in async manner, and reports its progress.
type GithubRelease ¶
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
func (*Updater) Check ¶
Check queries che GitHub release API to see if there is a new release compared to the current version of tpix-cli.
func (*Updater) Update ¶
func (u *Updater) Update() (*DownloadProgress, error)
Update downloads the specified version to disk and replace the current version.
Click to show internal directories.
Click to hide internal directories.