From 6cb3e01888ada1b9114cca68452f46ed2134b0cc Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 19 Mar 2019 14:53:27 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B6=9C=EB=A0=A5=20=ED=98=95=EC=8B=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/src/fullcycle/do-iperf/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/src/fullcycle/do-iperf/main.go b/go/src/fullcycle/do-iperf/main.go index e364963..fee93ac 100644 --- a/go/src/fullcycle/do-iperf/main.go +++ b/go/src/fullcycle/do-iperf/main.go @@ -36,7 +36,7 @@ func main() { out = f } - test("hw-wifi", host, out) + test("hw-ethernet", host, out) } func test(code, host string, out io.Writer) { @@ -52,11 +52,11 @@ func test(code, host string, out io.Writer) { s := bufio.NewScanner(stdout) for s.Scan() { - fmt.Fprintf(out, "{\"code\": \"%v\", \"state\": %v, \"data\": \"%v\", \"timeout\": 10}\n", code, state, s.Text()) + fmt.Fprintf(out, "{\"%v\": {\"progress\": %v, \"result\": \"%v\"}}\n", code, state, s.Text()) if state < 90 { state += 10 } } - fmt.Fprintf(out, "{\"code\": \"%v\", \"state\": 100, \"data\": \"\", \"timeout\": 10}\n", code) + fmt.Fprintf(out, "{\"%v\": {\"progress\": 100, \"result\": \"\"}}\n", code) } -- 2.1.4