From 420169aaab30ab6142526ebf941d6bd45059a0e6 Mon Sep 17 00:00:00 2001 From: stayweek <165480133+stayweek@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:18:06 +0800 Subject: [PATCH] fix: fix some comments (#12417) Signed-off-by: stayweek Co-authored-by: J Stickler --- clients/pkg/logentry/stages/extensions.go | 2 +- clients/pkg/logentry/stages/limit_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clients/pkg/logentry/stages/extensions.go b/clients/pkg/logentry/stages/extensions.go index f25ffe02e8403..d2e788dcb9d1a 100644 --- a/clients/pkg/logentry/stages/extensions.go +++ b/clients/pkg/logentry/stages/extensions.go @@ -128,7 +128,7 @@ type CriConfig struct { MaxPartialLineSizeTruncate bool `mapstructure:"max_partial_line_size_truncate"` } -// validateDropConfig validates the DropConfig for the dropStage +// validateCriConfig validates the CriConfig for the cri stage func validateCriConfig(cfg *CriConfig) error { if cfg.MaxPartialLines == 0 { cfg.MaxPartialLines = MaxPartialLinesSize diff --git a/clients/pkg/logentry/stages/limit_test.go b/clients/pkg/logentry/stages/limit_test.go index b439db4908b2f..840db40d37cb2 100644 --- a/clients/pkg/logentry/stages/limit_test.go +++ b/clients/pkg/logentry/stages/limit_test.go @@ -60,7 +60,7 @@ var testNonAppLogLine = ` var plName = "testPipeline" -// TestLimitPipeline is used to verify we properly parse the yaml config and create a working pipeline +// TestLimitWaitPipeline is used to verify we properly parse the yaml config and create a working pipeline func TestLimitWaitPipeline(t *testing.T) { registry := prometheus.NewRegistry() pl, err := NewPipeline(util_log.Logger, loadConfig(testLimitWaitYaml), &plName, registry) @@ -78,7 +78,7 @@ func TestLimitWaitPipeline(t *testing.T) { assert.Equal(t, out[0].Line, testMatchLogLineApp1) } -// TestLimitPipeline is used to verify we properly parse the yaml config and create a working pipeline +// TestLimitDropPipeline is used to verify we properly parse the yaml config and create a working pipeline func TestLimitDropPipeline(t *testing.T) { registry := prometheus.NewRegistry() pl, err := NewPipeline(util_log.Logger, loadConfig(testLimitDropYaml), &plName, registry)