From 519725bb3c075ee2462c929f5997cb068e18466a Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Mon, 26 Mar 2012 16:50:58 +0200 Subject: Imported Upstream version 2012.03.22 --- src/pkg/encoding/asn1/common.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pkg/encoding/asn1/common.go') diff --git a/src/pkg/encoding/asn1/common.go b/src/pkg/encoding/asn1/common.go index f7cb3acbb..03856bc55 100644 --- a/src/pkg/encoding/asn1/common.go +++ b/src/pkg/encoding/asn1/common.go @@ -75,6 +75,7 @@ type fieldParameters struct { tag *int // the EXPLICIT or IMPLICIT tag (maybe nil). stringType int // the string tag to use when marshaling. set bool // true iff this should be encoded as a SET + omitEmpty bool // true iff this should be omitted if empty when marshaling. // Invariants: // if explicit is set, tag is non-nil. @@ -116,6 +117,8 @@ func parseFieldParameters(str string) (ret fieldParameters) { if ret.tag == nil { ret.tag = new(int) } + case part == "omitempty": + ret.omitEmpty = true } } return -- cgit v1.2.3