aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config/config.go')
-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!")
}