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

Wrong message field type in generated proto file for a named type of []byte #95

Open
aantelov87 opened this issue Nov 29, 2017 · 0 comments
Labels

Comments

@aantelov87
Copy link

aantelov87 commented Nov 29, 2017

Right now I am doing something like this:

type OrderID []byte

type Order struct {
	ID          OrderID
	description string
}

The proto generated by proteus was:

message Order {
	option (gogoproto.goproto_getters) = false;
	option (gogoproto.typedecl) = false;
	repeated uint32 id = 1 [(gogoproto.casttype) = "byte", (gogoproto.customname) = "ID"];
}

The expected output:

message Order {
	option (gogoproto.goproto_getters) = false;
	option (gogoproto.typedecl) = false;
	repeated bytes id = 1 [(gogoproto.casttype) = "OrderID", (gogoproto.customname) = "ID"];
}
@aantelov87 aantelov87 changed the title Wrong generated proto file for named type of []byte Wrong message field type in generated proto file for a named type of []byte Nov 29, 2017
@mcuadros mcuadros added the bug label Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants