mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 14:14:02 +03:00
Add method for validation of the secret
This commit is contained in:
+2
-2
@@ -55,8 +55,8 @@ type Config struct {
|
||||
}
|
||||
|
||||
func (c *Config) Validate() error {
|
||||
if len(c.Secret.Key) == 0 || c.Secret.Host == "" {
|
||||
return fmt.Errorf("incorrect secret %s", c.Secret.String())
|
||||
if !c.Secret.Valid() {
|
||||
return fmt.Errorf("invalid secret %s", c.Secret.String())
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user