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
encoding/asn1: marshaling ignores the default value for optional elements. #7780
Labels
Milestone
Comments
CL https://golang.org/cl/86960045 mentions this issue. |
This issue was closed by revision 8332112. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
ASN.1 elements can be optional, and can have a default value. Traditionally, Go has omitted elements that are optional and that have the zero value. I believe that's a bug (see [1]). This change causes an optional element with a default value to only be omitted when it has that default value. The previous behaviour of omitting optional, zero elements with no default is retained because it's used quite a lot and will break things if changed. [1] https://groups.google.com/d/msg/Golang-nuts/9Ss6o9CW-Yo/KL_V7hFlyOAJ Fixes golang#7780. R=bradfitz LGTM=bradfitz R=golang-codereviews, bradfitz, rsc CC=golang-codereviews, r https://golang.org/cl/86960045
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
ASN.1 elements can be optional, and can have a default value. Traditionally, Go has omitted elements that are optional and that have the zero value. I believe that's a bug (see [1]). This change causes an optional element with a default value to only be omitted when it has that default value. The previous behaviour of omitting optional, zero elements with no default is retained because it's used quite a lot and will break things if changed. [1] https://groups.google.com/d/msg/Golang-nuts/9Ss6o9CW-Yo/KL_V7hFlyOAJ Fixes golang#7780. R=bradfitz LGTM=bradfitz R=golang-codereviews, bradfitz, rsc CC=golang-codereviews, r https://golang.org/cl/86960045
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: