platform: Prepare connections list

This commit is contained in:
世界
2024-10-13 13:06:55 +08:00
parent d44e7d9834
commit b1d75812c5
18 changed files with 652 additions and 254 deletions
+4
View File
@@ -17,6 +17,10 @@ func newIterator[T any](values []T) *iterator[T] {
return &iterator[T]{values}
}
func newPtrIterator[T any](values []T) *iterator[*T] {
return &iterator[*T]{common.Map(values, func(value T) *T { return &value })}
}
func (i *iterator[T]) Next() T {
if len(i.values) == 0 {
return common.DefaultValue[T]()