From 46e835f041065f1fea0230d055528d0cd33ad4c6 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Thu, 15 Oct 2026 16:45:37 +0000 Subject: [PATCH] acc: fix empty entries in ENVFILTER filters, enable makezero getEnvFilters created the result with make([]string, len(filters)) and then appended to it, so the filter list started with len(filters) empty strings. Co-authored-by: Isaac --- .golangci.yaml | 1 + acceptance/acceptance_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.golangci.yaml b/.golangci.yaml index 5f70ca86430..7bd0fcb8e32 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -34,6 +34,7 @@ linters: - asciicheck - reassign - modernize + - makezero settings: modernize: # omitzero changes JSON wire format for nested structs (unlike omitempty), diff --git a/acceptance/acceptance_test.go b/acceptance/acceptance_test.go index fb1013a424a..a1b2df2a7b9 100644 --- a/acceptance/acceptance_test.go +++ b/acceptance/acceptance_test.go @@ -675,7 +675,7 @@ func getEnvFilters(t *testing.T) []string { } filters := strings.Split(envFilterValue, ",") - outFilters := make([]string, len(filters)) + outFilters := make([]string, 0, len(filters)) for _, filter := range filters { items := strings.Split(filter, "=")