From db21119ad93843db691956cc01b649c606cb13e2 Mon Sep 17 00:00:00 2001 From: Adlotsof Date: Mon, 21 Oct 2024 09:35:49 +0200 Subject: [PATCH] fix return without assignment --- .../component/otelcol/exporter/splunkhec/splunkhec.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/component/otelcol/exporter/splunkhec/splunkhec.go b/internal/component/otelcol/exporter/splunkhec/splunkhec.go index 44e35b8b98..15cad4bf9c 100644 --- a/internal/component/otelcol/exporter/splunkhec/splunkhec.go +++ b/internal/component/otelcol/exporter/splunkhec/splunkhec.go @@ -8,6 +8,7 @@ import ( otelcolCfg "github.com/grafana/alloy/internal/component/otelcol/config" "github.com/grafana/alloy/internal/component/otelcol/exporter" splunkhec_config "github.com/grafana/alloy/internal/component/otelcol/exporter/splunkhec/config" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" @@ -50,13 +51,12 @@ func (args *Arguments) SetToDefault() { func (args Arguments) Convert() (otelcomponent.Config, error) { - res := splunkhec_config.SplunkHecArguments{ + return (&splunkhec_config.SplunkHecArguments{ Splunk: args.Splunk, QueueSettings: *args.Queue.Convert(), RetrySettings: *args.Retry.Convert(), - SplunkHecClientArguments: args.Client} - return res.Convert(), nil - + SplunkHecClientArguments: args.Client, + }).Convert(), nil } func (args *Arguments) Validate() error {