This commit is contained in:
Max 2022-11-15 23:18:30 +08:00
parent b5fc871d9c
commit bbaa4fa620

View file

@ -300,7 +300,7 @@ func printApis(silent bool) {
if len(api.HTTP.Paths) <= 0 { if len(api.HTTP.Paths) <= 0 {
continue continue
} }
log.Info("[API] %s(%d)", api.Name, len(api.HTTP.Paths)) log.Info("[API] %s(%d)", api.ID, len(api.HTTP.Paths))
for _, p := range api.HTTP.Paths { for _, p := range api.HTTP.Paths {
log.Info("%s %s %s", p.Method, filepath.Join("/api", api.HTTP.Group, p.Path), p.Process) log.Info("%s %s %s", p.Method, filepath.Join("/api", api.HTTP.Group, p.Path), p.Process)
} }
@ -321,11 +321,11 @@ func printApis(silent bool) {
} }
deprecated := "" deprecated := ""
if strings.HasPrefix(api.Name, "xiang.") { if strings.HasPrefix(api.ID, "xiang.") {
deprecated = " WILL BE DEPRECATED" deprecated = " WILL BE DEPRECATED"
} }
fmt.Printf("%s%s\n", color.CyanString("\n%s(%d)", api.Name, len(api.HTTP.Paths)), color.RedString(deprecated)) fmt.Printf("%s%s\n", color.CyanString("\n%s(%d)", api.ID, len(api.HTTP.Paths)), color.RedString(deprecated))
for _, p := range api.HTTP.Paths { for _, p := range api.HTTP.Paths {
fmt.Println( fmt.Println(
colorMehtod(p.Method), colorMehtod(p.Method),