spinner.go
func New(cs []string, d time.Duration, options ...Option) *Spinner {
	s := &Spinner{
		Delay:    d,
		chars:    cs,
		color:    color.New(color.FgWhite).SprintFunc(),
		lock:     &sync.RWMutex{},
		Writer:   color.Output,
		active:   false,
		stopChan: make(chan struct{}, 1),
	}

	for _, option := range options {
		option(s)
	}
	return s
}
func New(cs []string, d time.Duration, options ...Option) *Spinner {
	s := &Spinner{
		Delay:    d,
		chars:    cs,
		color:    color.New(color.FgWhite).SprintFunc(),
		lock:     &sync.RWMutex{},
		Writer:   color.Output,
		active:   false,
		stopChan: make(chan struct{}, 1),
	}

	for _, option := range options {
		option(s)
	}
	return s
}
func New ( cs [ ] string , d time . Duration , options ... Option ) * Spinner { s := & Spinner { Delay : d , chars : cs , color : color . New ( color . FgWhite ) . SprintFunc ( ) , lock : & sync . RWMutex { } , Writer : color . Output , active : false , stopChan : make ( chan struct { } , 1 ) , } for _ , option := range options { option ( s ) } return s }
// New provides a pointer to an instance of Spinner with the supplied options
New provides a pointer to an instance of Spinner with the supplied options