no \t to space line (#3177)

Co-authored-by: chenjieping <chenjieping@kezaihui.com>
master
chensy 2 years ago committed by GitHub
parent 3189ec7be6
commit c0f8a58ed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -171,7 +171,9 @@ func apiFormat(data string, skipCheckDeclare bool, filename ...string) (string,
tapCount++ tapCount++
} }
} }
if line != "" {
util.WriteIndent(&builder, tapCount) util.WriteIndent(&builder, tapCount)
}
builder.WriteString(line + pathx.NL) builder.WriteString(line + pathx.NL)
if strings.HasSuffix(noCommentLine, leftParenthesis) || strings.HasSuffix(noCommentLine, leftBrace) { if strings.HasSuffix(noCommentLine, leftParenthesis) || strings.HasSuffix(noCommentLine, leftBrace) {
tapCount++ tapCount++

@ -26,6 +26,11 @@ service A-api {
handler: GreetHandler handler: GreetHandler
) )
get /greet/from/:name(Request) returns (Response) get /greet/from/:name(Request) returns (Response)
@server(
handler: GreetHandler2
)
get /greet/from2/:name(Request) returns (Response)
} }
` `
@ -41,6 +46,11 @@ service A-api {
handler: GreetHandler handler: GreetHandler
) )
get /greet/from/:name(Request) returns (Response) get /greet/from/:name(Request) returns (Response)
@server(
handler: GreetHandler2
)
get /greet/from2/:name(Request) returns (Response)
}` }`
) )

Loading…
Cancel
Save