Documentation ¶
Index ¶
- Variables
- func CacheDir() string
- func Exec(command string, args []string) (string, error)
- func Exists(path string) (bool, error)
- func FetchConcurrently(urls []string, concurrency, wait int) (responses [][]byte, err error)
- func FetchURL(url string) ([]byte, error)
- func FileWalk(root string, targetFiles map[string]struct{}, ...) error
- func FilterTargets(prefixPath string, targets map[string]struct{}) (map[string]struct{}, error)
- func GenWorkers(num, wait int) chan<- func()
- func GetDefaultLogDir() string
- func IsCommandAvailable(name string) bool
- func Major(osVer string) (majorVersion string)
- func SetLogger(logToFile bool, logDir string, debug, logJSON bool) error
- func TrimSpaceNewline(str string) string
- func Unique[T comparable](s []T) []T
- type ProgressBar
- type Spinner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Quiet manages the display of NewSpinner, ProgressBar Quiet = false )
Functions ¶
func FetchConcurrently ¶
FetchConcurrently fetches concurrently
func FileWalk ¶ added in v0.3.0
func FileWalk(root string, targetFiles map[string]struct{}, walkFn func(r io.Reader, path string) error) error
FileWalk walks the file tree rooted at root
func FilterTargets ¶ added in v0.3.0
FilterTargets filter targets
func GetDefaultLogDir ¶
func GetDefaultLogDir() string
GetDefaultLogDir returns default log directory
func IsCommandAvailable ¶ added in v0.3.0
IsCommandAvailable check if command is available.
func TrimSpaceNewline ¶
TrimSpaceNewline deletes space character and newline character(CR/LF)
Types ¶
type ProgressBar ¶ added in v0.3.0
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar has ProgressBar client
func PbStartNew ¶ added in v0.3.0
func PbStartNew(total int) *ProgressBar
PbStartNew creates a ProgressBar
func (*ProgressBar) Finish ¶ added in v0.3.0
func (p *ProgressBar) Finish()
Finish to exit the ProgressBar
func (*ProgressBar) Increment ¶ added in v0.3.0
func (p *ProgressBar) Increment()
Increment increments the ProgressBar
type Spinner ¶ added in v0.3.0
type Spinner struct {
// contains filtered or unexported fields
}
Spinner has Spinner client
func NewSpinner ¶ added in v0.3.0
NewSpinner creates a Spinner
Click to show internal directories.
Click to hide internal directories.