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

33 lines
443 B

2 years ago
package config
import (
"log"
"github.com/kelseyhightower/envconfig"
)
2 years ago
type appConfig struct {
2 years ago
Port int `envconfig:"APP_PORT"`
}
2 years ago
type kafkaConfig struct {
Port int `envconfig:"KAFKA_PORT"`
2 years ago
Host string `envconfig:"KAFKA_HOST"`
2 years ago
}
2 years ago
// ...
type Config struct {
2 years ago
App appConfig
Kafka kafkaConfig
2 years ago
}
func NewConfig() *Config {
c := Config{}
err := envconfig.Process("", &c)
if err != nil {
log.Fatal(err.Error())
}
return &c
}