Skip to content

Commit 5bdaf86

Browse files
committed
fixed build
1 parent f5572de commit 5bdaf86

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

utils/utils.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,8 @@ var jsonPathCacheEager sync.Map
6969
// ClearJSONPathCache resets the compiled JSONPath cache.
7070
// Call this between document lifecycles in long-running processes to bound memory.
7171
func ClearJSONPathCache() {
72-
jsonPathCacheLazy.Range(func(key, _ interface{}) bool {
73-
jsonPathCacheLazy.Delete(key)
74-
return true
75-
})
76-
jsonPathCacheEager.Range(func(key, _ interface{}) bool {
77-
jsonPathCacheEager.Delete(key)
78-
return true
79-
jsonPathCache.Clear()
72+
jsonPathCacheLazy.Clear()
73+
jsonPathCacheEager.Clear()
8074
}
8175

8276
var jsonPathQuery = func(path *jsonpath.JSONPath, node *yaml.Node) []*yaml.Node {

0 commit comments

Comments
 (0)