From ba82b593dcf4870990f8a4289ab56f6239cfb0e3 Mon Sep 17 00:00:00 2001 From: DiegoVictor Date: Wed, 23 Oct 2024 20:23:42 -0300 Subject: [PATCH] Stop capturing stdout --- container/templates/go.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/container/templates/go.go b/container/templates/go.go index 5c6d4b3..4554138 100644 --- a/container/templates/go.go +++ b/container/templates/go.go @@ -28,24 +28,24 @@ func executor(input Request) Response { Value: input.Value, } - originalStdout := os.Stdout - reader, writer, _ := os.Pipe() - os.Stdout = writer + // originalStdout := os.Stdout + // reader, writer, _ := os.Pipe() + // os.Stdout = writer - channel := make(chan string) + // channel := make(chan string) - go func() { - var buffer bytes.Buffer - io.Copy(&buffer, reader) - channel <- buffer.String() - }() + // go func() { + // var buffer bytes.Buffer + // io.Copy(&buffer, reader) + // channel <- buffer.String() + // }() output, err := run(input.Value) - writer.Close() - os.Stdout = originalStdout + // writer.Close() + // os.Stdout = originalStdout - response.Stdout = <-channel + // response.Stdout = <-channel if err != nil { fmt.Println(err.Error())