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]