-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support for Go modules #5
Comments
@nleiva This appears to get more complex as we introduce modules. For example...
Errors out:
Fixing references:
|
Fixed function itself but a test is now failing which appears related to the unmarshaling. |
I am especially inclined to look at #15 with these jsonpb issues. |
Yeah, codec_gpb_test.go still references to
We cannot access the embedded or promoted fields in a struct literal. You either do it like you did: marshallerEmitString := &Marshaler{
EmitUInt64Unquoted: false,
Marshaler: jsonpb.Marshaler{
EmitDefaults: true,
OrigName: true,
},
} or marshallerEmitString := Marshaler{}
marshallerEmitString.EmitUInt64Unquoted = false
marshallerEmitString.EmitDefaults = true
marshallerEmitString.OrigName = true |
I'll take a look at it. |
We need to migrate to Go modules (go.mod and go.sum). Pipeline is currently using Glide for dependency management which is no longer maintained.
In order to do so, we first need to remove the changes go generate makes to jsonpb as depicted in vendor.patch.
EmitUInt64Unquoted
is not part of the official protobuf library, so we need to replicate theMarshaler
struct of github.com/golang/protobuf/jsonpb with this field on it. "A little copying is better than a little dependency".I will first attempt to do this, before updating dependencies and bring Go 1.12 support as well.
The text was updated successfully, but these errors were encountered: