mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-11-29 10:41:00 +00:00
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 {
|
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 == "" {
|
||||||
|
|
Loading…
Reference in a new issue