fea: config: add tests

This commit is contained in:
Daniel Ding
2022-10-28 20:52:02 +08:00
parent a69383c919
commit 72d8316aaa
15 changed files with 209 additions and 228 deletions

View File

@@ -17,7 +17,7 @@ func (c *Crypt) IsZero() bool {
return c.Algo == "" && c.Secret == ""
}
func (c *Crypt) Default() {
func (c *Crypt) Correct() {
if c.Secret != "" && c.Algo == "" {
c.Algo = "xor"
}