split watcher and http server from sender + add golanci config

This commit is contained in:
2023-09-10 21:59:57 +02:00
parent d831c3e0aa
commit 3c4b740849
8 changed files with 401 additions and 126 deletions
+4 -4
View File
@@ -10,7 +10,7 @@ import (
type SMTPConfig struct {
User string `validate:"required"`
Password string `validate:"required"`
Url string `validate:"required"`
URL string `validate:"required"`
Port string `validate:"required"`
}
@@ -18,7 +18,7 @@ func NewSMTPConfig(user, password, url, port string) (SMTPConfig, error) {
config := SMTPConfig{
User: user,
Password: password,
Url: url,
URL: url,
Port: port,
}
@@ -30,6 +30,6 @@ func NewSMTPConfig(user, password, url, port string) (SMTPConfig, error) {
return config, nil
}
func (c SMTPConfig) GetFullUrl() string {
return fmt.Sprintf("%s:%s", c.Url, c.Port)
func (c SMTPConfig) GetFullURL() string {
return fmt.Sprintf("%s:%s", c.URL, c.Port)
}