From 04762fd7d46fce4389b94fd94a7629cc635f1557 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Fri, 20 Aug 2021 11:40:07 -0700 Subject: [PATCH] Fix syntax errors --- libbeat/esleg/eslegclient/connection.go | 2 +- libbeat/kibana/client.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libbeat/esleg/eslegclient/connection.go b/libbeat/esleg/eslegclient/connection.go index 293a3f2384a..ecaded1079c 100644 --- a/libbeat/esleg/eslegclient/connection.go +++ b/libbeat/esleg/eslegclient/connection.go @@ -119,7 +119,7 @@ func NewConnection(s ConnectionSettings) (*Connection, error) { } else { name = strings.Title(name) } - userAgent = useragent.UserAgent(name) + userAgent := useragent.UserAgent(name) httpClient, err := s.Transport.Client( httpcommon.WithLogger(logger), diff --git a/libbeat/kibana/client.go b/libbeat/kibana/client.go index 189d9351ddc..1cad68a06dd 100644 --- a/libbeat/kibana/client.go +++ b/libbeat/kibana/client.go @@ -148,12 +148,12 @@ func NewClientWithConfigDefault(config *ClientConfig, defaultPort int) (*Client, name, err := os.Executable() if err != nil { - logp.Errorf("Unable to get running executable name: %v", err) + log.Errorf("Unable to get running executable name: %v", err) name = "KibanaClient" } else { name = strings.Title(name) } - userAgent = useragent.UserAgent(name) + userAgent := useragent.UserAgent(name) rt, err := config.Transport.Client(httpcommon.WithHeaderRoundTripper(map[string]string{"User-Agent": userAgent})) if err != nil {