This commit is contained in:
2025-05-11 11:54:21 +02:00
parent 4144e694c0
commit 827cb66b4e
13 changed files with 234 additions and 257 deletions
+2 -2
View File
@@ -6,11 +6,11 @@ import (
"time"
)
func Dict(values ...interface{}) (map[string]interface{}, error) {
func Dict(values ...any) (map[string]any, error) {
if len(values)%2 != 0 {
return nil, errors.New("invalid dict call")
}
dict := make(map[string]interface{}, len(values)/2)
dict := make(map[string]any, len(values)/2)
for i := 0; i < len(values); i += 2 {
key, ok := values[i].(string)
if !ok {