Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultProgressBar getter.ProgressTracker = &ProgressBar{}
DefaultProgressBar is the default instance of a cheggaaa progress bar.
Functions ¶
func ProgressBarConfig ¶
func ProgressBarConfig(bar *pb.ProgressBar, prefix string)
ProgressBarConfig config
Types ¶
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar wraps a github.com/cheggaaa/pb.Pool in order to display download progress for one or multiple downloads.
If two different instance of ProgressBar try to display a progress only one will be displayed. It is therefore recommended to use DefaultProgressBar
func (*ProgressBar) TrackProgress ¶
func (cpb *ProgressBar) TrackProgress(src string, currentSize, totalSize int64, stream io.ReadCloser) io.ReadCloser
TrackProgress instantiates a new progress bar that will display the progress of stream until closed. total can be 0.
type Release ¶
type Release struct { Account string Name string ArtifactName string LocalFileName string Version string URL string }
Release represents a github release
func (*Release) DownloadIfNotExists ¶
DownloadIfNotExists downloads a github release if its not present in the local config folder
func (*Release) SetArtifactName ¶
SetArtifactName returns artifactname given GOOS and GOARCH
func (*Release) SetDownloadURL ¶
SetDownloadURL based on if version is latest or tagged
func (*Release) SetVersion ¶
SetVersion return version from config file or latest if not specified