From c6050a2dc4862d7dd061cceef553153d84e1c1ec Mon Sep 17 00:00:00 2001 From: brent saner Date: Wed, 17 Jul 2024 02:49:44 -0400 Subject: [PATCH] fix xml marshaling In some (most) cases, disabled chars may not be specified. if this is the case, they should be omitted. --- pwgenerator/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwgenerator/types.go b/pwgenerator/types.go index 2dc6006..470e8df 100644 --- a/pwgenerator/types.go +++ b/pwgenerator/types.go @@ -50,7 +50,7 @@ type GenOpts struct { // CountExtended specifies how many extended symbols (0x80 to 0xff) should be specified at a minimum. CountExtended uint `json:"extended" toml:"extended" yaml:"Number of Extended Symbols" xml:"numXSymbols,attr"` // DisabledChars includes characters that should NOT be included from the above selection options. - DisabledChars CharSet `json:"disabled_chars" toml:"disabled_chars" yaml:"Disabled CharSet" xml:"disabledChars"` + DisabledChars CharSet `json:"disabled_chars,omitempty" toml:"disabled_chars,omitempty" yaml:"Disabled CharSet,omitempty" xml:"disabledChars,omitempty"` // LengthMin specifies how long (in characters/bytes) each password should be at minimum. Use 0 for no minimum. LengthMin uint `json:"length_min" toml:"length_min" yaml:"Minimum Length" xml:"minLen,attr"` /*