Reuse frozen inspection mapping lookups
This commit is contained in:
@@ -12,7 +12,11 @@ import (
|
||||
// Snapshot projection is the shared redaction boundary for effective YAML
|
||||
// and explanation values. It borrows frozen trees and returns a detached tree.
|
||||
func valueSnapshot(root *document.Node, path Path, secrets map[string]bool) ValueSnapshot {
|
||||
node, present := documentAtPath(root, path)
|
||||
return valueSnapshotWithLookup(root, path, secrets, nil)
|
||||
}
|
||||
|
||||
func valueSnapshotWithLookup(root *document.Node, path Path, secrets map[string]bool, lookup *documentLookup) ValueSnapshot {
|
||||
node, present := documentAtPathWithLookup(root, path, lookup)
|
||||
if !present {
|
||||
return ValueSnapshot{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user