Skip to content
New issue

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

Empty service definition in proto file produces bad go code #171

Closed
ofpiyush opened this issue Apr 9, 2019 · 2 comments
Closed

Empty service definition in proto file produces bad go code #171

ofpiyush opened this issue Apr 9, 2019 · 2 comments

Comments

@ofpiyush
Copy link
Contributor

ofpiyush commented Apr 9, 2019

Steps to reproduce:

Try compiling this

syntax = "proto3";
package foo;
service Bar {
}

Errors:

imported and not used: "strings"
prefix declared and not used

Fixes:

Add a method to prevent import failing right after import statements

var _ = strings.Index

// Add empty use to prevent prefix failing in client functions

_ = prefix
@spenczar
Copy link
Contributor

Thanks for the bug report. I'll put together a fix and a release.

@spenczar
Copy link
Contributor

Fixed in #172, release v5.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants