refactor(controller):精简控制器中路由的注册。

This commit is contained in:
徐涛
2022-08-20 07:00:34 +08:00
parent 62540f7a9a
commit 2d1196c703
7 changed files with 35 additions and 93 deletions

View File

@@ -30,7 +30,7 @@ func PinyinAbbr(source string) string {
return finalAbbr
}
func Keys[T comparable](m map[T]any) []T {
func Keys[T comparable, V any](m map[T]V) []T {
keys := make([]T, 0, len(m))
for key := range m {
keys = append(keys, key)