aboutsummaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-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" {
go.git/commit/pkg/config/config.go?h=v1.5.1&id=fec3ecd257c34fba37703b2999ab5ea902314657&follow=1'>Option "reupload-if-updated"René 'Necoro' Neumann2-0/+4 2020-05-03Fix typoRené 'Necoro' Neumann1-2/+2 2020-05-02Use uuid library directly and encode to base64.René 'Necoro' Neumann6-10/+16 2020-05-02RestructureRené 'Necoro' Neumann8-95/+111 2020-05-02WIP: Message-IdsRené 'Necoro' Neumann8-5/+40 2020-05-02Typo and mention config example in READMERené 'Necoro' Neumann2-1/+3