aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/asn1
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2016-10-26 12:18:00 -0400
committerRuss Cox <rsc@golang.org>2016-11-03 16:04:55 +0000
commit23e6e1124522267655b05a5f47f62fc99f0e56c3 (patch)
tree778761f23fdab4f8b9ba908408022bf882013739 /src/encoding/asn1
parentced137fad48ad18518cdd4ed3a77e75d5e58c78c (diff)
downloadgo-23e6e1124522267655b05a5f47f62fc99f0e56c3.tar.gz
go-23e6e1124522267655b05a5f47f62fc99f0e56c3.zip
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 <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Quentin Smith <quentin@golang.org>
Diffstat (limited to 'src/encoding/asn1')
-rw-r--r--src/encoding/asn1/asn1.go2
1 files changed, 1 insertions, 1 deletions
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