From 47c2f01c9cef37b88be837c201bdb1ef66c4c652 Mon Sep 17 00:00:00 2001 From: Snider Date: Sat, 25 Apr 2026 10:12:18 +0100 Subject: [PATCH] fix(webview): AX-6 banned-import purge in console.go (#624) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removed strings import. Replaced strings.ToLower → core.Lower and strings.Builder → core.NewBuilder. Closes tasks.lthn.sh/view.php?id=624 Co-authored-by: Codex --- console.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/console.go b/console.go index 3483474..254abf5 100644 --- a/console.go +++ b/console.go @@ -5,7 +5,6 @@ import ( "context" "iter" "slices" - "strings" "sync" // Note: AX-6 — internal concurrency primitive; structural per RFC §3/§6 "sync/atomic" // Note: AX-6 — internal concurrency primitive; structural per RFC §3/§6 "time" @@ -75,7 +74,7 @@ func NewConsoleWatcher(wv *Webview) *ConsoleWatcher { // It accepts legacy warning aliases and stores the compact warn form used by // the existing console message contract. func normalizeConsoleType(raw string) string { - normalized := strings.ToLower(core.Trim(core.Sprint(raw))) + normalized := core.Lower(core.Trim(core.Sprint(raw))) if normalized == "warn" || normalized == "warning" { return "warn" } @@ -84,7 +83,7 @@ func normalizeConsoleType(raw string) string { // canonicalConsoleType returns the RFC-canonical console type name. func canonicalConsoleType(raw string) string { - normalized := strings.ToLower(core.Trim(core.Sprint(raw))) + normalized := core.Lower(core.Trim(core.Sprint(raw))) if normalized == "warn" || normalized == "warning" { return "warning" } @@ -792,7 +791,7 @@ func trimExceptionInfos(exceptions []ExceptionInfo, limit int) []ExceptionInfo { } func sanitizeConsoleText(text string) string { - var b strings.Builder + b := core.NewBuilder() b.Grow(len(text)) for _, r := range text {