api/cmd/api/spec_groups_iter.go
Virgil 8149b0abf2 refactor(api): centralise spec group iterator
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-02 07:57:58 +00:00

16 lines
407 B
Go

// SPDX-License-Identifier: EUPL-1.2
package api
import (
"iter"
goapi "dappco.re/go/core/api"
)
// specGroupsIter snapshots the registered spec groups and appends one optional
// extra group. It keeps the command paths iterator-backed while preserving the
// existing ordering guarantees.
func specGroupsIter(extra goapi.RouteGroup) iter.Seq[goapi.RouteGroup] {
return goapi.SpecGroupsIter(extra)
}