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

Correct wellKnownTypeConv function references #811

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

johanbrandhorst
Copy link
Collaborator

@johanbrandhorst johanbrandhorst commented Nov 15, 2018

Correct wellKnownTypeConv function references.

Fixes #808

@johanbrandhorst johanbrandhorst changed the title Corret wellKnownTypeConv function references Corret cwellKnownTypeConv function references Nov 15, 2018
@johanbrandhorst johanbrandhorst changed the title Corret cwellKnownTypeConv function references Correct wellKnownTypeConv function references Nov 15, 2018
@johanbrandhorst johanbrandhorst merged commit da4a1fc into master Nov 15, 2018
".google.protobuf.FloatValue": "runtime.FloatValue",
".google.protobuf.DoubleValue": "runtime.DoubleValue",
".google.protobuf.BoolValue": "runtime.BoolValue",
".google.protobuf.StringValue": "runtime.String",
Copy link
Contributor

Choose a reason for hiding this comment

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

@johanbrandhorst seems it's still broken.

I try doing go install where my *.pb.gw.go files are.
Throws: cannot assign string to protoReq.Domain (type *wrappers.StringValue) in multiple assignment

Copy link
Contributor

Choose a reason for hiding this comment

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

One way I could find is to update our runtime/convert.go to support StringValue.

func StringValue(val string) (*wrappers.StringValue, error) {                                                                                
        return &wrappers.StringValue{Value: val}, nil                                                                                        
}

and keep the map here in types.go as:

".google.protobuf.BoolValue":   "runtime.BoolValue"

@johanbrandhorst
Copy link
Collaborator Author

Sigh it's clear to me that we need a little more time to work this out. I agree that your suggestion makes sense, can you submit a new PR? We need to add some examples in this area at the same time. I will revert my change to fix master.

@mayankcpdixit
Copy link
Contributor

mayankcpdixit commented Nov 16, 2018

Sure.
edit: Here it is: @johanbrandhorst #816

@johanbrandhorst johanbrandhorst deleted the johanbrandhorst-patch-1 branch November 16, 2018 10:33
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