aboutsummaryrefslogtreecommitdiff
path: root/stmutil/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'stmutil/containers.go')
-rw-r--r--stmutil/containers.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/stmutil/containers.go b/stmutil/containers.go
index c7a4a49..2ce05e4 100644
--- a/stmutil/containers.go
+++ b/stmutil/containers.go
@@ -88,6 +88,10 @@ func (m Map) Set(key, value any) Mappish {
return m
}
+func (m Map) Get(key any) (any, bool) {
+ return m.Map.Get(key)
+}
+
func (sm Map) Range(f func(key, value any) bool) {
iter := sm.Map.Iterator()
for !iter.Done() {
@@ -112,6 +116,10 @@ func (sm SortedMap) Set(key, value any) Mappish {
return sm
}
+func (sm SortedMap) Get(key any) (any, bool) {
+ return sm.SortedMap.Get(key)
+}
+
func (sm SortedMap) Delete(key any) Mappish {
sm.SortedMap = sm.SortedMap.Delete(key)
return sm