func runCountdown(duration, interval time.Duration) {
	endTime := time.Now().Add(duration)

	for tick := range time.Tick(interval) {
		// If countdown reached the end
		if tick.After(endTime) {
			fmt.Fprintf(out, "\r00:00:00.000")
			fmt.Fprintf(out, "\a")
			return
		}

		diff := endTime.Sub(tick)
		fmt.Fprintf(out, "\r%v", timeutil.Format(diff))
	}
}
// runCountdown counts down from the given duration in the given interval steps.
runCountdown counts down from the given duration in the given interval steps.
// runCountdown counts down from the given duration in the given interval steps .
func runCountdown(duration, interval time.Duration) {
	endTime := time.Now().Add(duration)
	for tick := range time.Tick(interval) {
		if tick.After(endTime) {
			fmt.Fprintf(out, "\r00:00:00.000")
			fmt.Fprintf(out, "\a")
			return
		}
		diff := endTime.Sub(tick)
		fmt.Fprintf(out, "\r%v", timeutil.Format(diff))
	}
}
func runCountdown ( duration , interval time . Duration ) { endTime := time . Now ( ) . Add ( duration ) for tick := range time . Tick ( interval ) { if tick . After ( endTime ) { fmt . Fprintf ( out , " \r " ) fmt . Fprintf ( out , " \a " ) return } diff := endTime . Sub ( tick ) fmt . Fprintf ( out , " \r " , timeutil . Format ( diff ) ) } }
runCountdown counts down from the given duration in the given interval steps.
runCountdown counts down from the given duration in the given interval steps .
// If countdown reached the end