mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 16:30:01 +08:00
chore: update go-zero version (#5093)
Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
@@ -115,29 +115,29 @@ func writeProperty(writer io.Writer, name, tag, comment string, tp spec.Type, in
|
||||
}
|
||||
|
||||
func getAuths(api *spec.ApiSpec) []string {
|
||||
authNames := collection.NewSet()
|
||||
authNames := collection.NewSet[string]()
|
||||
for _, g := range api.Service.Groups {
|
||||
jwt := g.GetAnnotation("jwt")
|
||||
if len(jwt) > 0 {
|
||||
authNames.Add(jwt)
|
||||
}
|
||||
}
|
||||
return authNames.KeysStr()
|
||||
return authNames.Keys()
|
||||
}
|
||||
|
||||
func getJwtTrans(api *spec.ApiSpec) []string {
|
||||
jwtTransList := collection.NewSet()
|
||||
jwtTransList := collection.NewSet[string]()
|
||||
for _, g := range api.Service.Groups {
|
||||
jt := g.GetAnnotation(jwtTransKey)
|
||||
if len(jt) > 0 {
|
||||
jwtTransList.Add(jt)
|
||||
}
|
||||
}
|
||||
return jwtTransList.KeysStr()
|
||||
return jwtTransList.Keys()
|
||||
}
|
||||
|
||||
func getMiddleware(api *spec.ApiSpec) []string {
|
||||
result := collection.NewSet()
|
||||
result := collection.NewSet[string]()
|
||||
for _, g := range api.Service.Groups {
|
||||
middleware := g.GetAnnotation("middleware")
|
||||
if len(middleware) > 0 {
|
||||
@@ -147,7 +147,7 @@ func getMiddleware(api *spec.ApiSpec) []string {
|
||||
}
|
||||
}
|
||||
|
||||
return result.KeysStr()
|
||||
return result.Keys()
|
||||
}
|
||||
|
||||
func responseGoTypeName(r spec.Route, pkg ...string) string {
|
||||
|
||||
Reference in New Issue
Block a user