daemon/logger/fluentd: rename var that collided with import

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-04-10 12:20:52 +02:00
parent 40182954fa
commit 0dd2b4d577
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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)