Merge pull request #7 from bracki/cosmetics

Cosmetics
This commit is contained in:
juliusv 2015-02-11 22:43:17 +01:00
commit a373aee28e

View file

@ -30,9 +30,9 @@ func serveHTTP() {
} }
func udpAddrFromString(addr string) *net.UDPAddr { func udpAddrFromString(addr string) *net.UDPAddr {
host, portStr, err := net.SplitHostPort(*statsdListenAddress) host, portStr, err := net.SplitHostPort(addr)
if err != nil { if err != nil {
log.Fatal("Bad StatsD listening address", *statsdListenAddress) log.Fatal("Bad StatsD listening address", addr)
} }
if host == "" { if host == "" {
@ -45,7 +45,7 @@ func udpAddrFromString(addr string) *net.UDPAddr {
port, err := strconv.Atoi(portStr) port, err := strconv.Atoi(portStr)
if err != nil || port < 0 || port > 65535 { if err != nil || port < 0 || port > 65535 {
log.Fatal("Bad port %s: %s", portStr, err) log.Fatalf("Bad port %s: %s", portStr, err)
} }
return &net.UDPAddr{ return &net.UDPAddr{