diff options
Diffstat (limited to 'src/pkg/encoding/asn1/common.go')
-rw-r--r-- | src/pkg/encoding/asn1/common.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 |