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

37 lines
521 B

package config
import (
"log"
"github.com/kelseyhightower/envconfig"
)
type DbConfig struct {
Host string `envconfig:"DB_HOST"`
Port int `envconfig:"DB_PORT"`
}
type AppConfig struct {
Port int `envconfig:"APP_PORT"`
}
type SentryConfig struct {
DSN string `envconfig:"SENTRY_DSN"`
}
// ...
type Config struct {
Db DbConfig
App AppConfig
Sentry SentryConfig
}
func NewConfig() *Config {
c := Config{}
err := envconfig.Process("", &c)
if err != nil {
log.Fatal(err.Error())
}
return &c
}