From: Russ Cox Date: Wed, 26 Oct 2016 16:18:00 +0000 (-0400) Subject: encoding/asn1: document that default:x tag only has meaning with optional tag X-Git-Tag: go1.8beta1~345 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=23e6e1124522267655b05a5f47f62fc99f0e56c3;p=gostls13.git encoding/asn1: document that default:x tag only has meaning with optional tag Fixes #16712. Change-Id: Ib216059c6c0c952162c19e080dcf3799f0652a8d Reviewed-on: https://go-review.googlesource.com/32171 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Quentin Smith --- diff --git a/src/encoding/asn1/asn1.go b/src/encoding/asn1/asn1.go index a442995e92..044f74ab46 100644 --- a/src/encoding/asn1/asn1.go +++ b/src/encoding/asn1/asn1.go @@ -976,7 +976,7 @@ func setDefaultValue(v reflect.Value, params fieldParameters) (ok bool) { // The following tags on struct fields have special meaning to Unmarshal: // // application specifies that a APPLICATION tag is used -// default:x sets the default value for optional integer fields +// default:x sets the default value for optional integer fields (only used if optional is also present) // explicit specifies that an additional, explicit tag wraps the implicit one // optional marks the field as ASN.1 OPTIONAL // set causes a SET, rather than a SEQUENCE type to be expected