Use argument instead of global

This commit is contained in:
Jan Brauer 2015-02-11 22:30:57 +01:00
parent 5488430fad
commit f7dfad9bd4

View file

@ -30,9 +30,9 @@ func serveHTTP() {
}
func udpAddrFromString(addr string) *net.UDPAddr {
host, portStr, err := net.SplitHostPort(*statsdListenAddress)
host, portStr, err := net.SplitHostPort(addr)
if err != nil {
log.Fatal("Bad StatsD listening address", *statsdListenAddress)
log.Fatal("Bad StatsD listening address", addr)
}
if host == "" {