This commit is contained in:
2025-04-18 16:23:34 +02:00
parent 10e326b4b1
commit d199bd97ba
3 changed files with 46 additions and 5 deletions

View File

@ -7,12 +7,13 @@ import (
type Config struct {
BaseURL string `env:"WAZUH_MANAGER_BASE_URL,required,notEmpty"`
User string `env:"WAZUH_MANAGER_USER,required,notEmpty"`
Passwd string `env:"WAZUH_MANAGER_PASSWD,required,notEmpty"`
}
func NewConfig() (*Config, error) {
cfg := &Config{}
if err := env.Parse(cfg); err != nil {
log.Print(err)
return nil, err
}