refactor: infinite kill exercise (loops)

This commit is contained in:
Inanc Gumus
2018-11-09 13:43:00 +03:00
parent d25082a63a
commit 89d880ecd8
2 changed files with 18 additions and 3 deletions

View File

@ -17,15 +17,17 @@ func main() {
for {
var c string
switch rand.Intn(3) {
switch rand.Intn(4) {
case 0:
c = "\\"
case 1:
c = "/"
case 2:
c = "|"
case 3:
c = "-"
}
fmt.Printf("\r%s", c)
fmt.Printf("\r%s Please Wait. Processing....", c)
time.Sleep(time.Millisecond * 150)
}
}