Debian Codegraph @

tests/runner.go

raw symbols SCIP
1 //go:build ignore
2 // +build ignore
3
4 package main
5
6 import (
7 "bufio"
8 "fmt"
9 "log"
10 "os"
11 "time"
12 )
13
14 func main() {
15 if len(os.Args) < 2 {
16 log.Fatal("must pass a filename")
17 }
18 f, err := os.Open(os.Args[1])
19 if err != nil {
20 log.Fatal(err)
21 }
22 buf := bufio.NewReader(f)
23 for {
24 r, _, err := buf.ReadRune()
25 if err != nil {
26 log.Fatal(err)
27 }
28
29 fmt.Printf("%c", r)
30 time.Sleep(10 * time.Millisecond)
31 }
32 }