forked from mirrors/statsd_exporter
Use argument instead of global
This commit is contained in:
parent
5488430fad
commit
f7dfad9bd4
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -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 == "" {
|
||||
|
|
Loading…
Reference in a new issue