From 9a8a1ee0bbce716ebad5ae5740018b3fa487bd37 Mon Sep 17 00:00:00 2001 From: Inanc Gumus Date: Fri, 10 May 2019 22:59:12 +0300 Subject: [PATCH] ... --- 28-methods/logparser-testing/main_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/28-methods/logparser-testing/main_test.go b/28-methods/logparser-testing/main_test.go index b679322..b706f78 100644 --- a/28-methods/logparser-testing/main_test.go +++ b/28-methods/logparser-testing/main_test.go @@ -46,13 +46,7 @@ func TestSummary(t *testing.T) { func run(t *testing.T, in, out string) { cmd := exec.Command("go", "run", ".") - - stdin, err := cmd.StdinPipe() - if err != nil { - t.Fatal(err) - } - stdin.Write([]byte(in)) - stdin.Close() + cmd.Stdin = strings.NewReader(in) got, err := cmd.CombinedOutput() if err != nil {