Cleanup the URL when one isn't specified

This commit is contained in:
Evan Phoenix 2015-06-23 14:51:55 -07:00
parent a1f7d5549b
commit 86a6f337f6
1 changed files with 2 additions and 0 deletions

View File

@ -92,7 +92,9 @@ func (g *Redis) Gather(acc plugins.Accumulator) error {
return fmt.Errorf("Unable to parse to address '%s': %s", serv, err)
} else if u.Scheme == "" {
// fallback to simple string based address (i.e. "10.0.0.1:10000")
u.Scheme = "tcp"
u.Host = serv
u.Path = ""
}
wg.Add(1)
go func(serv string) {