From 94fca801c3cda6a6813f8cf972275cdb988453de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 13 Apr 2016 11:08:44 +0100 Subject: [PATCH] Make the host a constant --- adb/adb.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/adb/adb.go b/adb/adb.go index aaadb42..e98a233 100644 --- a/adb/adb.go +++ b/adb/adb.go @@ -15,7 +15,10 @@ import ( "strings" ) -const port = 5037 +const ( + host = "127.0.0.1" + port = 5037 +) var ( // Common install and uninstall errors @@ -154,7 +157,7 @@ func parseError(s string) error { } func IsServerRunning() bool { - conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", "127.0.0.1", port)) + conn, err := net.Dial("tcp", fmt.Sprintf("%s:%d", host, port)) if err != nil { return false }