changes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user