You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
failed to UnmarshalText: "/* 3 unknown bytes */\n1: \"0\"\n"
panic: line 1.0: unexpected byte 0x2f
MarshalText should not produce text that is unparsable by UnmarshalText.
Either MarshalText should write unknown bytes differently, or UnmarshalText accept the current output of MarshalText.
No, the text format is not an interchange format. There is no guarantee that MarshalText's output will be parseable by UnmarshalText, especially when it fails.
There are quite a few ways that a proto struct might not be representable in text format; having unrecognised fields is one way, and that's what your example hit.
golang
locked as resolved and limited conversation to collaborators
Jun 25, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following program crashes with the following message:
MarshalText should not produce text that is unparsable by UnmarshalText.
Either MarshalText should write unknown bytes differently, or UnmarshalText accept the current output of MarshalText.
on commit 34a5f24
The text was updated successfully, but these errors were encountered: