platform: Prepare connections list

This commit is contained in:
世界 2024-06-11 21:16:33 +08:00
parent 7ef8b71fa6
commit d0e2c7e29c
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
18 changed files with 651 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]()