in cmd/cloudshell_open/main.go [108:123]
func logProgress(msg, endMsg, errMsg string) func(bool) {
s := spinner.New(spinner.CharSets[9], 300*time.Millisecond)
s.Prefix = "[ "
s.Suffix = " ] " + msg
s.Start()
return func(success bool) {
s.Stop()
if success {
if endMsg != "" {
fmt.Printf("%s %s\n", successPrefix, endMsg)
}
} else {
fmt.Printf("%s %s\n", errorPrefix, errMsg)
}
}
}