From 08db46454363226ffbe4bbfa927823498efa0331 Mon Sep 17 00:00:00 2001 From: Pion <59523206+pionbot@users.noreply.github.com> Date: Thu, 5 Mar 2026 12:06:41 +0000 Subject: [PATCH 1/2] Update CI configs to v0.12.1 Update lint scripts and CI configs. --- .golangci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.golangci.yml b/.golangci.yml index 43af4c3..1fbb8db 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,7 @@ linters: - maintidx # maintidx measures the maintainability index of each function. - makezero # Finds slice declarations with non-zero initial length - misspell # Finds commonly misspelled English words in comments + - modernize # Replace and suggests simplifications to code - nakedret # Finds naked returns in functions greater than a specified function length - nestif # Reports deeply nested if statements - nilerr # Finds the code that returns nil even if it checks that the error is not nil. From d4bf648a7cadce0017c63fc85d9cace29a63284e Mon Sep 17 00:00:00 2001 From: Allan Date: Tue, 10 Mar 2026 21:57:41 -0300 Subject: [PATCH 2/2] Use strings.SplitSeq instead of strings.Split --- json_logger.go | 4 ++-- logger.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/json_logger.go b/json_logger.go index f21a27d..ce7ca40 100644 --- a/json_logger.go +++ b/json_logger.go @@ -308,8 +308,8 @@ func newJSONLoggerFactory() *jsonLoggerFactory { continue } - scopes := strings.Split(strings.ToLower(env), ",") - for _, scope := range scopes { + scopes := strings.SplitSeq(strings.ToLower(env), ",") + for scope := range scopes { factory.scopeLevels[scope] = level } } diff --git a/logger.go b/logger.go index 3af89fe..5b18530 100644 --- a/logger.go +++ b/logger.go @@ -220,8 +220,8 @@ func NewDefaultLoggerFactory() *DefaultLoggerFactory { continue } - scopes := strings.Split(strings.ToLower(env), ",") - for _, scope := range scopes { + scopes := strings.SplitSeq(strings.ToLower(env), ",") + for scope := range scopes { factory.ScopeLevels[scope] = level } }