From e8f2ef9fbe3cc8e1007172d07c594d4b97f7fcec Mon Sep 17 00:00:00 2001 From: Kavindu Dodanduwa Date: Thu, 10 Oct 2024 10:37:14 -0700 Subject: [PATCH] code review change - fix typo Signed-off-by: Kavindu Dodanduwa --- x-pack/filebeat/input/awscloudwatch/input.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/filebeat/input/awscloudwatch/input.go b/x-pack/filebeat/input/awscloudwatch/input.go index 7fdab2b9441..f66e403a1a9 100644 --- a/x-pack/filebeat/input/awscloudwatch/input.go +++ b/x-pack/filebeat/input/awscloudwatch/input.go @@ -130,7 +130,7 @@ func (in *cloudwatchInput) Run(inputContext v2.Context, pipeline beat.Pipeline) // fromConfig is a helper to parse input configurations and derive logGroupIDs & aws region // Returned logGroupIDs could be empty, which require other fallback mechanisms to derive them. // See getLogGroupNames for example. -func fromConfig(cfg config, awsCfg awssdk.Config) (logGrouIDs []string, region string, err error) { +func fromConfig(cfg config, awsCfg awssdk.Config) (logGroupIDs []string, region string, err error) { // LogGroupARN has precedence over LogGroupName & RegionName if cfg.LogGroupARN != "" { parsedArn, err := arn.Parse(cfg.LogGroupARN) @@ -144,14 +144,14 @@ func fromConfig(cfg config, awsCfg awssdk.Config) (logGrouIDs []string, region s // refine to match AWS API parameter regex of logGroupIdentifier groupId := strings.TrimSuffix(cfg.LogGroupARN, ":*") - logGrouIDs = append(logGrouIDs, groupId) + logGroupIDs = append(logGroupIDs, groupId) - return logGrouIDs, parsedArn.Region, nil + return logGroupIDs, parsedArn.Region, nil } // then fallback to LogrGroupName if cfg.LogGroupName != "" { - logGrouIDs = append(logGrouIDs, cfg.LogGroupName) + logGroupIDs = append(logGroupIDs, cfg.LogGroupName) } // finally derive region @@ -161,7 +161,7 @@ func fromConfig(cfg config, awsCfg awssdk.Config) (logGrouIDs []string, region s region = awsCfg.Region } - return logGrouIDs, region, nil + return logGroupIDs, region, nil } // getLogGroupNames uses DescribeLogGroups API to retrieve all log group names