Co-authored-by: chenjieping <chenjieping@kezaihui.com>
@ -171,7 +171,9 @@ func apiFormat(data string, skipCheckDeclare bool, filename ...string) (string,
tapCount++
}
util.WriteIndent(&builder, tapCount)
if line != "" {
builder.WriteString(line + pathx.NL)
if strings.HasSuffix(noCommentLine, leftParenthesis) || strings.HasSuffix(noCommentLine, leftBrace) {
@ -26,6 +26,11 @@ service A-api {
handler: GreetHandler
)
get /greet/from/:name(Request) returns (Response)
@server(
handler: GreetHandler2
get /greet/from2/:name(Request) returns (Response)
`
@ -41,6 +46,11 @@ service A-api {
}`