You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// // Ideally, a collection implementation from a Map would have been defined that knows how to iterate over a K,V set to avoid iterating over the full map initially generate
117
-
// // an array of `*KeyValuePair`. However, there is not way to iterate over a K,V set of a map through reflection, instead the only thing available is the function `MapKeys`
118
-
// // which
119
-
// val := reflect.ValueOf(m)
120
-
//
121
-
// if val.Kind() != reflect.Map {
122
-
// return nil, fmt.Errorf("unable to create a key value set collection, the input value must be a map, %s", val.Kind().String())
123
-
// }
124
-
//
125
-
// var array []*KeyValuePair
126
-
// for _, key := range val.MapKeys() {
127
-
// array = append(array, &KeyValuePair{
128
-
// Key: key.Interface(),
129
-
// Value: val.MapIndex(key),
130
-
// })
131
-
// }
132
-
//
133
-
// return NewCollectionFromArray(array)
134
-
//}
135
115
// NewArrayCollection Creates a new empty array collection of the given type
136
116
//
137
117
// - elementType: The element type for the items in the collection to be created.
0 commit comments