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) }