go-zero
go-zero copied to clipboard
.api file does not support prefix only with "-"
Describe the bug .api file does not support prefix only with "-"
Some of my url prefix is "/-/", it is VALID for http
but i can't use in api file.
To Reproduce Steps to reproduce the behavior, if applicable:
-
The code is
@server ( group: main prefix: /-/ ) service trafficredirect { @doc ( summary: "ping" ) @handler PingHandler get /ping (PingReq) returns (PingResp) }
@server ( group: main prefix: /- ) service trafficredirect { @doc ( summary: "ping" ) @handler PingHandler get /ping (PingReq) returns (PingResp) }
2. The error is
syntax error: expected 'IDENT', got '-'
**Expected behavior**
support valid char or char combination in the prefix
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environments (please complete the following information):**
- OS: darwin
- goctl version 1.8.4 darwin/amd64
**More description**
Add any other context about the problem here.