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
I was trying to encode and decode HTTP responses. to deal with the body I created a custom ReadCloser with its own UnmarshalBinary and MarshalBinary methods. The gob output was inconsistent with the output of the UnmarshalBinary
UnmarshalBinary must be able to decode the form generated by MarshalBinary. UnmarshalBinary must copy the data if it wishes to retain the data after returning.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?go version go1.17.8 darwin/arm64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying to encode and decode HTTP responses. to deal with the body I created a custom
ReadCloser
with its ownUnmarshalBinary
andMarshalBinary
methods. The gob output was inconsistent with the output of theUnmarshalBinary
I also created a sample repo to demonstrate the same - https://github.com/slayerjain/gob-decode-issue
What did you expect to see?
I expected the gob output to match the output of the
UnmarshalBinary
method that I definedWhat did you see instead?
Some extra gibberish is added along with the expected data. Likely from the TLS object of the
http.response
The text was updated successfully, but these errors were encountered: