mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-04-06 21:37:35 +03:00
platform: Prepare connections list
This commit is contained in:
parent
7ef8b71fa6
commit
d0e2c7e29c
18 changed files with 651 additions and 254 deletions
|
@ -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]()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue