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
Is there ever a reason you'd want to marshal a message without setting its root? It took me a while to discover why I couldn't Unmarshal the resulting bytes.
The text was updated successfully, but these errors were encountered:
Ultimately, that's a mix of an implementation and API issue. I can't think of a reason to marshal a rootless message.
The underlying issue is that the current API for new messages already allocates the space for the root pointer (but doesn't make it point anywhere), so that's why you get a weird stream instead of a nil, len(0) or error.
Is there ever a reason you'd want to marshal a message without setting its root? It took me a while to discover why I couldn't Unmarshal the resulting bytes.
The text was updated successfully, but these errors were encountered: