feat: add gen api @doc comment to logic handler routes (#3790)

Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
This commit is contained in:
chentong
2024-03-30 19:09:54 +08:00
committed by GitHub
parent cf987295df
commit 8c0bb27136
7 changed files with 54 additions and 41 deletions

View File

@@ -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, "\"")
}