mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-11-09 20:00:12 +00:00
18 lines
261 B
Go
18 lines
261 B
Go
|
package linecache
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"strings"
|
||
|
"testing"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func Test(t *testing.T) {
|
||
|
wr := NewLineCache(10)
|
||
|
for i := 10; i < 50; i++ {
|
||
|
fmt.Fprintln(wr, i)
|
||
|
fmt.Print(strings.ReplaceAll(wr.String(), "\n", " "), "\n")
|
||
|
time.Sleep(time.Second)
|
||
|
}
|
||
|
}
|