BUGFIX: Allocate tmp once
This commit is contained in:
parent
0237f30135
commit
c807d95b21
@ -46,9 +46,9 @@ func cmdStdin(commandline []string, input <-chan string) {
|
||||
|
||||
// stdout displaying thread
|
||||
go func() {
|
||||
for {
|
||||
// FIXME
|
||||
tmp := make([]byte, 1024)
|
||||
for {
|
||||
_, err := stdout.Read(tmp)
|
||||
if len(bytes.Trim(tmp, "\x00")) > 0 {
|
||||
for _, line := range strings.Split(strings.ReplaceAll(string(bytes.Trim(tmp, "\x00")), "\r\n", "\n"), "\n") {
|
||||
|
Loading…
Reference in New Issue
Block a user