utils

package
v0.0.0-...-0e2e07d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Quiet = false
)

Functions

func CacheDir

func CacheDir() string

func Exec

func Exec(command string, args []string) (string, error)

func Exists

func Exists(path string) (bool, error)

func FileWalk

func FileWalk(root string, walkFn func(r io.Reader, path string) error) error

func IsCommandAvailable

func IsCommandAvailable(name string) bool

func IsInt

func IsInt(s string) bool

func MustTimeParse

func MustTimeParse(value string) *time.Time

func StringInSlice

func StringInSlice(a string, list []string) bool

func Uniq

func Uniq(strings []string) []string

Types

type ProgressBar

type ProgressBar struct {
	// contains filtered or unexported fields
}

TODO: Expose an interface for progressbar

func PbStartNew

func PbStartNew(total int) *ProgressBar

func (*ProgressBar) Finish

func (p *ProgressBar) Finish()

func (*ProgressBar) Increment

func (p *ProgressBar) Increment()

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewSpinner

func NewSpinner(suffix string) *Spinner

func (*Spinner) Start

func (s *Spinner) Start()

func (*Spinner) Stop

func (s *Spinner) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL