Your ROOT_URL in app.ini is http://git.slaventius.ru/ but you are visiting http://37.143.12.169/test3k/authPostman/blame/commit/4b9e7fc8455550db5f4718e6a6b063a61073459a/internal/config/config.go You should set ROOT_URL correctly, otherwise the web may not work correctly.

42 lines
746 B

2 years ago
package config
import (
"log"
"github.com/kelseyhightower/envconfig"
)
2 years ago
// type smtpConfig struct {
// Port int `envconfig:"SMTP_PORT"`
// Host string `envconfig:"SMTP_HOST"`
// Sender string `envconfig:"SMTP_SENDER"`
// Password string `envconfig:"SMTP_PASSWORD"`
// }
type telegramConfig struct {
ChatID int64 `envconfig:"CHAT_ID"`
ChatToken string `envconfig:"CHAT_TOKEN"`
2 years ago
}
2 years ago
type kafkaConfig struct {
2 years ago
Port int `envconfig:"KAFKA_PORT"`
Host string `envconfig:"KAFKA_HOST"`
2 years ago
}
// ...
type Config struct {
2 years ago
// Smtp smtpConfig
Kafka kafkaConfig
Telegram telegramConfig
2 years ago
}
func NewConfig() *Config {
c := Config{}
err := envconfig.Process("", &c)
if err != nil {
log.Fatal(err.Error())
}
return &c
}