aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/yaml_test.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2022-01-09 22:46:39 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2022-01-10 00:16:44 +0100
commitc20aa09fb31e09819e8e5eca222b3de2049cbdf8 (patch)
tree32cab850331780c04c4d1b0a281f01e70ede5dd0 /pkg/config/yaml_test.go
parent28df70c8969ecc31c3a11a2071c59c4c90f9d488 (diff)
downloadfeed2imap-go-c20aa09fb31e09819e8e5eca222b3de2049cbdf8.tar.gz
feed2imap-go-c20aa09fb31e09819e8e5eca222b3de2049cbdf8.tar.bz2
feed2imap-go-c20aa09fb31e09819e8e5eca222b3de2049cbdf8.zip
Replace homegrown map-to-structure code by using package mapstructure.
Diffstat (limited to '')
-rw-r--r--pkg/config/yaml_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/config/yaml_test.go b/pkg/config/yaml_test.go
index b02c4c4..b422c38 100644
--- a/pkg/config/yaml_test.go
+++ b/pkg/config/yaml_test.go
@@ -30,12 +30,12 @@ func TestBuildOptions(tst *testing.T) {
out Options
unknowns []string
}{
- {"Empty", nil, Options{}, Options{}, nil},
- {"Simple copy", nil, Options{MinFreq: 75}, Options{MinFreq: 75}, nil},
+ {"Empty", nil, Options{}, Options{}, []string{}},
+ {"Simple copy", nil, Options{MinFreq: 75}, Options{MinFreq: 75}, []string{}},
{"Unknowns", Map{"foo": 1}, Options{}, Options{}, []string{"foo"}},
- {"Override", Map{"include-images": true}, Options{InclImages: false}, Options{InclImages: true}, nil},
- {"Non-Standard Type", Map{"body": "both"}, Options{}, Options{Body: "both"}, nil},
- {"Mixed", Map{"min-frequency": 24}, Options{MinFreq: 6, InclImages: true}, Options{MinFreq: 24, InclImages: true}, nil},
+ {"Override", Map{"include-images": true}, Options{InclImages: false}, Options{InclImages: true}, []string{}},
+ {"Non-Standard Type", Map{"body": "both"}, Options{}, Options{Body: "both"}, []string{}},
+ {"Mixed", Map{"min-frequency": 24}, Options{MinFreq: 6, InclImages: true}, Options{MinFreq: 24, InclImages: true}, []string{}},
{"All",
Map{"max-frequency": 12, "include-images": true, "ignore-hash": true, "obsolete": 54},
Options{MinFreq: 6, InclImages: true, IgnHash: false},