aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-20 18:45:43 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-20 18:45:43 +0200
commitafe2c4919dc2ded2f3b7d796b914dd66fbe78e64 (patch)
treefebdd45c23807fa1e9c22078b7927cd39956f308 /internal/config
parent47fa4464d7cf028dd871d48bf6472d97f60b4a79 (diff)
downloadfeed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.tar.gz
feed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.tar.bz2
feed2imap-go-afe2c4919dc2ded2f3b7d796b914dd66fbe78e64.zip
Fixes and validation
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index a37cef1..409cbdf 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -1,6 +1,7 @@
package config
import (
+ "fmt"
"os"
"os/user"
"runtime"
@@ -33,6 +34,14 @@ type Options struct {
InclImages *bool `yaml:"include-images"`
}
+func (c *Config) Validate() error {
+ if c.Target == "" {
+ return fmt.Errorf("No target set!")
+ }
+
+ return nil
+}
+
func (c *Config) WithPartText() bool {
for _, part := range c.Parts {
if part == "text" {
deletions'>-35/+334 2007-04-10Some more functionality for the Qt-Frontend (complete emerge)necoro8-217/+347 2007-04-07Some more functionality for the Qt-Frontendnecoro11-88/+463 2007-04-07Added Qt-Terminalnecoro4-4/+213 2007-04-06First qt draftnecoro6-1/+796 2007-04-04showed masked packages unmasked by the user similar to stable marked testing ↵necoro5-13/+40 packages 2007-03-31changed changelognecoro1-1/+2 2007-03-31Some small changes for etcproposals 1.1necoro1-2/+2 2007-03-31Some small changes for etcproposals 1.1necoro2-3/+3 2007-03-31Some small changes for etcproposals 1.1necoro1-6/+13 2007-03-31Allowed Plugins to have a menunecoro7-201/+315 2007-03-15Added etc-proposals pluginnecoro7-28/+121 2007-03-10Added USE_EXPAND-supportnecoro5-11/+63 2007-03-10Added plugin-data to about-dialognecoro3-197/+264