mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 10:20:00 +08:00
feat: add gen api @doc comment to logic handler routes (#3790)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
@@ -181,3 +181,11 @@ func golangExpr(ty spec.Type, pkg ...string) string {
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
func getDoc(doc string) string {
|
||||
if len(doc) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
return "// " + strings.Trim(doc, "\"")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user