daemon/logger/fluentd: rename var that collided with import
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
40182954fa
commit
0dd2b4d577
1 changed files with 6 additions and 6 deletions
|
@ -280,22 +280,22 @@ func parseAddress(address string) (*location, error) {
|
|||
protocol := defaultProtocol
|
||||
givenAddress := address
|
||||
if urlutil.IsTransportURL(address) {
|
||||
url, err := url.Parse(address)
|
||||
addr, err := url.Parse(address)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "invalid fluentd-address %s", givenAddress)
|
||||
}
|
||||
// unix and unixgram socket
|
||||
if url.Scheme == "unix" || url.Scheme == "unixgram" {
|
||||
if addr.Scheme == "unix" || addr.Scheme == "unixgram" {
|
||||
return &location{
|
||||
protocol: url.Scheme,
|
||||
protocol: addr.Scheme,
|
||||
host: "",
|
||||
port: 0,
|
||||
path: url.Path,
|
||||
path: addr.Path,
|
||||
}, nil
|
||||
}
|
||||
// tcp|udp
|
||||
protocol = url.Scheme
|
||||
address = url.Host
|
||||
protocol = addr.Scheme
|
||||
address = addr.Host
|
||||
}
|
||||
|
||||
host, port, err := net.SplitHostPort(address)
|
||||
|
|
Loading…
Reference in a new issue