use array
This commit is contained in:
parent
50d5af714d
commit
d990a0559e
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
|
@ -175,7 +175,7 @@ func main() {
|
||||||
gc := make(chan *Grid, 10)
|
gc := make(chan *Grid, 10)
|
||||||
if text {
|
if text {
|
||||||
go func() {
|
go func() {
|
||||||
buf := make([]byte, (size*size)+size*6)
|
var buf [size * (size + 6)]byte
|
||||||
for {
|
for {
|
||||||
buf[0] = '+'
|
buf[0] = '+'
|
||||||
c := 1
|
c := 1
|
||||||
|
|
@ -212,7 +212,7 @@ func main() {
|
||||||
buf[c] = '+'
|
buf[c] = '+'
|
||||||
c++
|
c++
|
||||||
buf[c] = '\n'
|
buf[c] = '\n'
|
||||||
fmt.Printf("\r%s", string(buf))
|
fmt.Printf("\r%s", string(buf[:]))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue