We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f17bd20 commit 91cc0cfCopy full SHA for 91cc0cf
1 file changed
value.go
@@ -50,6 +50,16 @@ const (
50
skipMask FilterResult = 0b10
51
)
52
53
+// ShouldInclude informs if the provided filter result indicates that the given flag value should be included.
54
+func ShouldInclude(r FilterResult) bool {
55
+ return r&skipMask == 0
56
+}
57
+
58
+// ShouldDescend informs if the provided filter result indicates that the further recursive values finding should descend into sub-values.
59
+func ShouldDescend(r FilterResult) bool {
60
+ return r&noDescendMask == 0
61
62
63
// Filter applies all filter function to the provided flag value and returns filtering decision.
64
func Filter(val *Value, filters ...FilterFunc) (r FilterResult) {
65
if val == nil {
0 commit comments