platform: Prepare connections list

This commit is contained in:
世界
2024-06-11 21:16:33 +08:00
parent d44e7d9834
commit b1d75812c5
18 changed files with 652 additions and 254 deletions

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]()