From f75a12e10ae8990751b6c16869ffbe4519291884 Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Mon, 27 Jul 2020 15:57:29 -0700 Subject: [PATCH] Add omitempty tag option. --- authority/provisioner/options.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/authority/provisioner/options.go b/authority/provisioner/options.go index c56b6064..713d48ec 100644 --- a/authority/provisioner/options.go +++ b/authority/provisioner/options.go @@ -39,14 +39,14 @@ func (o *Options) GetX509Options() *X509Options { type X509Options struct { // Template contains a X.509 certificate template. It can be a JSON template // escaped in a string or it can be also encoded in base64. - Template string `json:"template"` + Template string `json:"template,omitempty"` // TemplateFile points to a file containing a X.509 certificate template. - TemplateFile string `json:"templateFile"` + TemplateFile string `json:"templateFile,omitempty"` // TemplateData is a JSON object with variables that can be used in custom // templates. - TemplateData json.RawMessage `json:"templateData"` + TemplateData json.RawMessage `json:"templateData,omitempty"` } // HasTemplate returns true if a template is defined in the provisioner options.