the assign operators, '=' and ':=', can set the value of dict items

This commit is contained in:
2026-05-17 07:15:12 +02:00
parent 3ccbeb3978
commit 1bf8015da1
4 changed files with 114 additions and 21 deletions
+3 -1
View File
@@ -10,6 +10,8 @@ import (
"strings"
)
const DictTypeName = "dict"
type DictType map[any]any
func IsDict(v any) (ok bool) {
@@ -131,7 +133,7 @@ func (dict *DictType) String() string {
}
func (dict *DictType) TypeName() string {
return "dict"
return DictTypeName
}
func (dict *DictType) HasKey(target any) (ok bool) {