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

UnmarshalText cannot unmarshal into cusomtype of type map #200

Open
ericlagergren opened this issue Sep 20, 2016 · 4 comments
Open

UnmarshalText cannot unmarshal into cusomtype of type map #200

ericlagergren opened this issue Sep 20, 2016 · 4 comments

Comments

@ericlagergren
Copy link

I've a custom type that's a map. When UnmarshalText is called it calls readStruct which calls the readAny method around line 637. This uses props.mkeyprop which in other circumstances would be a pointer to the property of a map key, but since it's a Go map not a protobuf map there's no property and a panic occurs.

@awalterschulze
Copy link
Member

Do you want to attempt a fix?

@awalterschulze awalterschulze changed the title proto: UnmarshalText cannot unmarshal into Go map UnmarshalText cannot unmarshal into cusomtype of type map Sep 22, 2016
@ericlagergren
Copy link
Author

Yes and no. I was about to yesterday but I had a bunch of other bugs to fix... and I'm not sure when, exactly, I'll be able to get around to it. (I might be able to outside of work.)

@awalterschulze
Copy link
Member

Cool well if you get time that will be great. In the mean time I have added these two issues to the documentation for customtype.

@awalterschulze
Copy link
Member

Is it possible to provide a test?

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

No branches or pull requests

2 participants