mirror of
https://github.com/golang/go
synced 2024-11-19 10:24:43 -07:00
encoding/asn1: document "utc" and "generalized" tags
Also reformat tables. Fixes #19889 Change-Id: I05083d2bab8bca46c4e22a415eb9b73513df6994 Reviewed-on: https://go-review.googlesource.com/40071 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
826a09cd65
commit
927f8a04cc
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user