]> Cypherpunks repositories - gostls13.git/commitdiff
encoding/asn1: document that default:x tag only has meaning with optional tag
authorRuss Cox <rsc@golang.org>
Wed, 26 Oct 2016 16:18:00 +0000 (12:18 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 3 Nov 2016 16:04:55 +0000 (16:04 +0000)
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>
src/encoding/asn1/asn1.go

index a442995e92dab3f0ef0ac1b038f157bc70b6cd91..044f74ab469d2968c05339808c15bc970447d4d5 100644 (file)
@@ -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