mirror of
https://github.com/AynaLivePlayer/liveroom-sdk.git
synced 2026-03-15 05:53:18 +08:00
sort providers
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package liveroom
|
||||
|
||||
import "sort"
|
||||
|
||||
var _providers map[string]ILiveRoomProvider = make(map[string]ILiveRoomProvider)
|
||||
|
||||
func RegisterProvider(provider ILiveRoomProvider) {
|
||||
@@ -20,5 +22,8 @@ func ListAvailableProviders() []string {
|
||||
for name := range _providers {
|
||||
names = append(names, name)
|
||||
}
|
||||
sort.Slice(names, func(i, j int) bool {
|
||||
return names[i] < names[j]
|
||||
})
|
||||
return names
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user