Skip to content

Commit

Permalink
Fix some style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
winks committed Aug 7, 2017
1 parent bf83b71 commit 4efb6a7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ip_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ func main() {
fmt.Println("tail: ", tail)
}

ip_addrs, err := net.LookupHost(hostname)
ipAddrs, err := net.LookupHost(hostname)
if err != nil {
log.Fatal(err)
}

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
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 4efb6a7

Please sign in to comment.