From 4efb6a7b1a931b74397008e64f27463f9a63c68b Mon Sep 17 00:00:00 2001 From: Florian Anderiasch Date: Mon, 7 Aug 2017 19:37:46 +0200 Subject: [PATCH] Fix some style issues --- ip_wrapper.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip_wrapper.go b/ip_wrapper.go index 4c703a8..b94440c 100644 --- a/ip_wrapper.go +++ b/ip_wrapper.go @@ -53,7 +53,7 @@ func main() { fmt.Println("tail: ", tail) } - ip_addrs, err := net.LookupHost(hostname) + ipAddrs, err := net.LookupHost(hostname) if err != nil { log.Fatal(err) } @@ -61,7 +61,7 @@ func main() { exitCode := 0 total := 0 exitCodes := []int{} - for _, ip := range ip_addrs { + for _, ip := range ipAddrs { exitCode = run(ip, tail) exitCodes = append(exitCodes, exitCode) total += exitCode @@ -122,10 +122,9 @@ func run(ip string, tail []string) int { exitCode2 = 2 } return exitCode2 - } else { - // exit code was 0 - return 0 } + // exit code was 0 + return 0 } func exitWithProperCode(total int, exitCodes []int) {