aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/config.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-14 23:37:35 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-14 23:37:35 +0200
commit2a8e0cf3750d3f789bcd756e39af04f00fe0e738 (patch)
tree384fcd7c9b34de17a6e516b9e2de9c88fa11a6f1 /pkg/config/config.go
parent65fe5cb5c88beabf6c045f20738af71c8d0e38ec (diff)
downloadfeed2imap-go-2a8e0cf3750d3f789bcd756e39af04f00fe0e738.tar.gz
feed2imap-go-2a8e0cf3750d3f789bcd756e39af04f00fe0e738.tar.bz2
feed2imap-go-2a8e0cf3750d3f789bcd756e39af04f00fe0e738.zip
Verbose variant of 'target' in config
Diffstat (limited to '')
-rw-r--r--pkg/config/config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index 8e2aff6..377365f 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -19,7 +19,7 @@ type Map map[string]interface{}
type GlobalOptions struct {
Timeout int `yaml:"timeout"`
DefaultEmail string `yaml:"default-email"`
- Target string `yaml:"target"`
+ Target Url `yaml:"target"`
Parts []string `yaml:"parts"`
MaxFailures int `yaml:"max-failures"`
}
@@ -29,7 +29,7 @@ var DefaultGlobalOptions = GlobalOptions{
Timeout: 30,
MaxFailures: 10,
DefaultEmail: username() + "@" + Hostname(),
- Target: "",
+ Target: Url{},
Parts: []string{"text", "html"},
}
@@ -77,7 +77,7 @@ func WithDefault() *Config {
// Validates the configuration against common mistakes
func (cfg *Config) Validate() error {
- if cfg.Target == "" {
+ if cfg.Target.Empty() {
return fmt.Errorf("No target set!")
}