Added loading-bar exercise
This commit is contained in:
parent
a806cecefa
commit
fa8a997395
|
@ -0,0 +1,3 @@
|
|||
module loading-bar
|
||||
|
||||
go 1.22.0
|
|
@ -0,0 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
for i := 0; i < 101; i++ {
|
||||
fmt.Printf("\rLoading... %v%%", i)
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
}
|
||||
fmt.Printf("\n")
|
||||
}
|
Loading…
Reference in New Issue