go-zero icon indicating copy to clipboard operation
go-zero copied to clipboard

The first level .api does not support "-" inside service?

Open litecy opened this issue 6 months ago • 0 comments

Like the api file in the first level, the error will be

.api 23:17 syntax error: expected 'api', got 'IDENT'

the 23:17 is just the "-" location in the service line

but it can be used by imported .api files use import ( "another.api" )

@server ( group: main prefix: /x ) service traffic-redirect { @doc ( summary: "ping" ) @handler PingHandler get /ping (PingReq) returns (PingResp) }

litecy avatar Jun 16 '25 23:06 litecy