Update internal/util/translator.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
이대희
2025-12-17 17:15:11 +09:00
committed by GitHub
parent 1b8e538a77
commit 27734a23b1

View File

@@ -33,9 +33,8 @@ func Walk(value gjson.Result, path, field string, paths *[]string) {
// . -> \.
// * -> \*
// ? -> \?
safeKey := strings.ReplaceAll(key.String(), ".", "\\.")
safeKey = strings.ReplaceAll(safeKey, "*", "\\*")
safeKey = strings.ReplaceAll(safeKey, "?", "\\?")
var keyReplacer = strings.NewReplacer(".", "\\.", "*", "\\*", "?", "\\?")
safeKey := keyReplacer.Replace(key.String())
if path == "" {
childPath = safeKey