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

Pulled out parseReq func into a generic package + tests #600

Merged
merged 2 commits into from
Apr 15, 2018

Conversation

f0rmiga
Copy link
Contributor

@f0rmiga f0rmiga commented Apr 14, 2018

Pulled out the duplicated parseReq function into a more generic package and added tests to it.

}

func mustGetReader(pb proto.Message) io.Reader {
b, _ := proto.Marshal(pb)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to panic on error instead of silencing in a must function

func main() {
flag.Parse()
defer glog.Flush()

reg := descriptor.NewRegistry()

glog.V(1).Info("Processing code generator request")
req, err := parseReq(os.Stdin)
glog.V(1).Info("Parsing code generator request")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate logging

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the one on line 37

@achew22 achew22 merged commit 7dcae0c into grpc-ecosystem:master Apr 15, 2018
@f0rmiga f0rmiga deleted the refactor-codegenerator branch April 15, 2018 23:05
adasari pushed a commit to adasari/grpc-gateway that referenced this pull request Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants