<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/filter.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2024-03-30 21:09:32 +0000
committerCharlie Stanton <charlie@shtanton.xyz>2024-03-30 21:09:32 +0000
commitfd79fd18c6c32884e757e91b8629c87af4cbf34e (patch)
tree50e6b49c64b1c6cf230c80ce83a925ec98fd2387 /subex/filter.go
parent976d96af62945178f3a3ab572620026df75003cf (diff)
downloadstred-go-fd79fd18c6c32884e757e91b8629c87af4cbf34e.tar
Add map destructure
Diffstat (limited to 'subex/filter.go')
-rw-r--r--subex/filter.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/subex/filter.go b/subex/filter.go
index dce0f0e..ae4b8ab 100644
--- a/subex/filter.go
+++ b/subex/filter.go
@@ -38,6 +38,12 @@ func (_ anyArrayFilter) valueFilter(value walk.Value) bool {
return isArray
}
+type anyMapFilter struct {}
+func (_ anyMapFilter) valueFilter(value walk.Value) bool {
+ _, isMap := value.(walk.MapValue)
+ return isMap
+}
+
type anyStringFilter struct {}
func (_ anyStringFilter) valueFilter(value walk.Value) bool {
_, isString := value.(walk.StringValue)