From 755d64061e95019c53d4c327eff34d3b53536db6 Mon Sep 17 00:00:00 2001 From: nityanandagohain Date: Wed, 15 Mar 2023 17:55:02 +0530 Subject: [PATCH] fix: minor spelling fixes --- pkg/query-service/app/opamp/logspipeline.go | 6 +++--- pkg/query-service/app/opamp/logspipeline_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/query-service/app/opamp/logspipeline.go b/pkg/query-service/app/opamp/logspipeline.go index e3f4dbeed0..c1dffa0980 100644 --- a/pkg/query-service/app/opamp/logspipeline.go +++ b/pkg/query-service/app/opamp/logspipeline.go @@ -34,7 +34,7 @@ func UpsertLogsParsingProcessor(ctx context.Context, parsingProcessors map[strin return confHash, err } - BuildLogParsingProcessors(c, parsingProcessors) + buildLogParsingProcessors(c, parsingProcessors) // get the processor list logs := c["service"].(map[string]interface{})["pipelines"].(map[string]interface{})["logs"] @@ -89,7 +89,7 @@ func UpsertLogsParsingProcessor(ctx context.Context, parsingProcessors map[strin // check if the processors already exist // if yes then update the processor. // if something doesn't exists then remove it. -func BuildLogParsingProcessors(agentConf, parsingProcessors map[string]interface{}) error { +func buildLogParsingProcessors(agentConf, parsingProcessors map[string]interface{}) error { agentProcessors := agentConf["processors"].(map[string]interface{}) exists := map[string]struct{}{} for key, params := range parsingProcessors { @@ -131,7 +131,7 @@ func buildLogsProcessors(current []interface{}, logsParserPipeline []interface{} existing[name] = i } - // create mapping from our tracesPipelinePlan (processors managed by us) to position in existing processors (from current config) + // create mapping from our logsParserPipeline to position in existing processors (from current config) // this means, if "batch" holds position 3 in the current effective config, and 2 in our config, the map will be [2]: 3 specVsExistingMap := map[int]int{} diff --git a/pkg/query-service/app/opamp/logspipeline_test.go b/pkg/query-service/app/opamp/logspipeline_test.go index d612959d19..703d5ecb6e 100644 --- a/pkg/query-service/app/opamp/logspipeline_test.go +++ b/pkg/query-service/app/opamp/logspipeline_test.go @@ -8,7 +8,7 @@ import ( "go.signoz.io/signoz/pkg/query-service/constants" ) -var BuildProcessorTestData = []struct { +var buildProcessorTestData = []struct { Name string agentConf map[string]interface{} pipelineProcessor map[string]interface{} @@ -89,9 +89,9 @@ var BuildProcessorTestData = []struct { } func TestBuildLogParsingProcessors(t *testing.T) { - for _, test := range BuildProcessorTestData { + for _, test := range buildProcessorTestData { Convey(test.Name, t, func() { - err := BuildLogParsingProcessors(test.agentConf, test.pipelineProcessor) + err := buildLogParsingProcessors(test.agentConf, test.pipelineProcessor) So(err, ShouldBeNil) So(test.agentConf, ShouldResemble, test.outputConf) })