aboutsummaryrefslogtreecommitdiff
path: root/pkg/config
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:52:55 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-26 17:52:55 +0200
commit63d20f3f7b02f33475049c12e03569a4f67fe810 (patch)
tree42cf1c8bd5d839a410c106c8a1d86b4d4180db37 /pkg/config
parent9e69c102b596924d589693ce537c4fecae3aa44c (diff)
downloadfeed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.tar.gz
feed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.tar.bz2
feed2imap-go-63d20f3f7b02f33475049c12e03569a4f67fe810.zip
Options: "disable" and "ignore-hash"
Diffstat (limited to '')
-rw-r--r--pkg/config/config.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 1b95f61..b24a9e8 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -37,6 +37,8 @@ var DefaultGlobalOptions = GlobalOptions{
type Options struct {
MinFreq *int `yaml:"min-frequency"`
InclImages *bool `yaml:"include-images"`
+ Disable *bool `yaml:"disable"`
+ IgnHash *bool `yaml:"ignore-hash"`
}
func (opt *Options) mergeFrom(other Options) {
@@ -46,6 +48,12 @@ func (opt *Options) mergeFrom(other Options) {
if opt.InclImages == nil {
opt.InclImages = other.InclImages
}
+ if opt.IgnHash == nil {
+ opt.IgnHash = other.IgnHash
+ }
+ if opt.Disable == nil {
+ opt.Disable = other.Disable
+ }
}
// Default feed options
@@ -57,6 +65,8 @@ func init() {
DefaultFeedOptions = Options{
MinFreq: &one,
InclImages: &fal,
+ IgnHash: &fal,
+ Disable: &fal,
}
}