package main import "fmt" import "time" func main() { chars := "|/-\\" i := 0 for { i++ char := chars[i%len(chars)] fmt.Printf("\rDownloading: %c", char) time.Sleep(100 * time.Millisecond) } }