1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 18:40:54 +00:00

对@Description支持多行描述

This commit is contained in:
wucheng 2020-08-12 16:14:23 +08:00
parent b56b3794e4
commit 2862ff48db

View File

@ -182,7 +182,7 @@ func GenerateDocs(curpath string) {
} else if strings.HasPrefix(s, "@Title") {
rootapi.Infos.Title = strings.TrimSpace(s[len("@Title"):])
} else if strings.HasPrefix(s, "@Description") {
rootapi.Infos.Description = strings.TrimSpace(s[len("@Description"):])
rootapi.Infos.Description += fmt.Sprintf("\n%s", strings.TrimSpace(s[len("@Description"):]))
} else if strings.HasPrefix(s, "@TermsOfServiceUrl") {
rootapi.Infos.TermsOfService = strings.TrimSpace(s[len("@TermsOfServiceUrl"):])
} else if strings.HasPrefix(s, "@Contact") {