From b4dc09fcaadb9edfd6c8e222064bb6529919e9a5 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 14 Mar 2019 10:52:47 +0900 Subject: [PATCH] =?UTF-8?q?=ED=98=B8=EC=8A=A4=ED=8A=B8=20=EC=A3=BC?= =?UTF-8?q?=EC=86=8C=20=EA=B8=B0=EB=B3=B8=20=EA=B0=92=EC=9D=84=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=A1=9C=20=EC=A7=80=EC=A0=95=20=EA=B0=80=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/src/fullcycle/do-iperf/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/go/src/fullcycle/do-iperf/main.go b/go/src/fullcycle/do-iperf/main.go index 9f693a8..e364963 100644 --- a/go/src/fullcycle/do-iperf/main.go +++ b/go/src/fullcycle/do-iperf/main.go @@ -4,6 +4,7 @@ import ( "bufio" "fmt" "io" + "io/ioutil" "log" "os" "os/exec" @@ -14,7 +15,12 @@ func main() { var out io.Writer if l := len(os.Args); l == 1 { - host = "172.30.0.1" + b, err := ioutil.ReadFile("host.iperf") + if err != nil { + host = "172.30.0.1" + } else { + host = string(b) + } out = os.Stdout } else if l == 2 { host = os.Args[1] -- 2.1.4