Commit 927f8a04 authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by Brad Fitzpatrick

encoding/asn1: document "utc" and "generalized" tags

Also reformat tables.

Fixes #19889

Change-Id: I05083d2bab8bca46c4e22a415eb9b73513df6994
Reviewed-on: https://go-review.googlesource.com/40071Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 826a09cd
......@@ -643,10 +643,12 @@ func makeField(v reflect.Value, params fieldParameters) (e encoder, err error) {
// In addition to the struct tags recognised by Unmarshal, the following can be
// used:
//
// ia5: causes strings to be marshaled as ASN.1, IA5 strings
// ia5: causes strings to be marshaled as ASN.1, IA5String values
// omitempty: causes empty slices to be skipped
// printable: causes strings to be marshaled as ASN.1, PrintableString strings.
// utf8: causes strings to be marshaled as ASN.1, UTF8 strings
// printable: causes strings to be marshaled as ASN.1, PrintableString values
// utf8: causes strings to be marshaled as ASN.1, UTF8String values
// utc: causes time.Time to be marshaled as ASN.1, UTCTime values
// generalized: causes time.Time to be marshaled as ASN.1, GeneralizedTime values
func Marshal(val interface{}) ([]byte, error) {
e, err := makeField(reflect.ValueOf(val), fieldParameters{})
if err != nil {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment