Skip to content

Commit 8c31450

Browse files
Snidercodex
andcommitted
fix(cache): AX-6 banned-import purge in cache.go
Removed strings import. Replaced strings.Builder → core.NewBuilder and strings.TrimPrefix → core.TrimPrefix. Co-authored-by: Codex <noreply@openai.com>
1 parent 49b1854 commit 8c31450

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cache.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
// Note: AX-6 — no core equivalent for Lstat symlink checks or dynamic working directory lookup.
1818
"os"
1919
"slices"
20-
"strings"
2120
// Note: AX-6 — core.RWMutex is not available in the pinned core module.
2221
"sync"
2322
// Note: AX-6 — no core equivalent for durations or wall-clock timestamps.
@@ -97,7 +96,7 @@ func marshalPrettyJSON(value any) (string, error) {
9796
}
9897

9998
func indentJSON(data []byte) string {
100-
var builder strings.Builder
99+
builder := core.NewBuilder()
101100
indent := 0
102101
inString := false
103102
escaped := false
@@ -1167,7 +1166,7 @@ func (scopedCache *ScopedCache) Age(key string) time.Duration {
11671166
}
11681167

11691168
func scopePattern(prefix, pattern string) string {
1170-
pattern = strings.TrimPrefix(pattern, "/")
1169+
pattern = core.TrimPrefix(pattern, "/")
11711170
if pattern == "" {
11721171
return prefix
11731172
}

0 commit comments

Comments
 (0)