chore: sort registered types
This commit is contained in:
parent
1c11cc46a1
commit
03e2e0e730
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ func (r registry[T]) Get(name string) (factoryFunc[T], error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r registry[T]) Types() []string {
|
func (r registry[T]) Types() []string {
|
||||||
return slices.Collect(maps.Keys(r.data))
|
return slices.Sorted(maps.Keys(r.data))
|
||||||
}
|
}
|
||||||
|
|
||||||
func New[T any](typ string) registry[T] {
|
func New[T any](typ string) registry[T] {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue