We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As of #59, post formatting .ridl files using -fmt=true with multiple Services does not work anymore.
-fmt=true
Create a example.ridl file with the following contents:
webrpc = v1 name = example-api version = v0.1.0 service ExampleService - Ping() - Status() => (status: bool) service DummyService - Ping() - Status() => (status: bool)
Running the following command:
webrpc-gen -schema=./example.ridl -pkg=webrpc -server -out=./gen/webrpc/example.gen.go -target=golang
Will result in:
format error : failed to format generated Go source: 57:2: expected ';', found 'type'
Running the same command with version v0.14.1 works fine:
webrpc-gen -schema=./example.ridl -pkg=webrpc -server -out=./gen/webrpc/example.gen.go -target=github.com/webrpc/[email protected]
The issue is in line 60 of types.go.tmpl. Changing this:
types.go.tmpl
{{- range $_, $method := $service.Methods -}} {{ if eq $method.StreamOutput true }}
To this:
{{- range $_, $method := $service.Methods }} {{ if eq $method.StreamOutput true -}}
Seems to fix the issue.
The text was updated successfully, but these errors were encountered:
thx for the PR. I tagged v0.14.3
Sorry, something went wrong.
VojtechVitek
No branches or pull requests
As of #59, post formatting .ridl files using
-fmt=true
with multiple Services does not work anymore.How to reproduce
Create a example.ridl file with the following contents:
Running the following command:
Will result in:
Running the same command with version v0.14.1 works fine:
Fix
The issue is in line 60 of
types.go.tmpl
. Changing this:To this:
Seems to fix the issue.
The text was updated successfully, but these errors were encountered: