Update typeprint.go
This commit is contained in:
parent
6f6a1e5a88
commit
ec504a1863
17
typeprint.go
17
typeprint.go
@ -1,18 +1 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func typeprint(s string) {
|
||||
for _, j := range s {
|
||||
if string(j) == "\n" {
|
||||
fmt.Printf("\n")
|
||||
} else {
|
||||
fmt.Printf("%c", j)
|
||||
}
|
||||
|
||||
time.Sleep(time.Millisecond * time.Duration(10))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user