package main import ( "fmt" "github.com/BGrewell/go-iperf" "os" "time" ) func main() { s := iperf.NewServer() err := s.Start() if err != nil { fmt.Printf("failed to start server: %v\n", err) os.Exit(-1) } for s.Running { time.Sleep(100 * time.Millisecond) } fmt.Println("server finished") }