From 23e6e1124522267655b05a5f47f62fc99f0e56c3 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 26 Oct 2016 12:18:00 -0400 Subject: [PATCH] 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 --- src/encoding/asn1/asn1.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.50.0