slaventius 2 years ago
parent d4995ee399
commit 083c995d64
  1. 2
      go.sum
  2. 12
      internal/config/config.go

@ -1,5 +1,3 @@
git.slaventius.ru/test3k/umate v0.0.0-20230213061556-8529690e1553 h1:Ojj8kD7B3MwEtopOorx/EZzEHITuBy1BgJsVQV9r598=
git.slaventius.ru/test3k/umate v0.0.0-20230213061556-8529690e1553/go.mod h1:xE7ik2EnLB+CNDJA5+HbRIwAk+V7sgUjS0HPeXS5Ka0=
git.slaventius.ru/test3k/umate v0.0.0-20230213064240-bf21e2057702 h1:C80T3ynUeO7wpGXIZSCNN3tLYpDqH4j/I06LVoBtoXs=
git.slaventius.ru/test3k/umate v0.0.0-20230213064240-bf21e2057702/go.mod h1:xE7ik2EnLB+CNDJA5+HbRIwAk+V7sgUjS0HPeXS5Ka0=
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s=

@ -6,24 +6,24 @@ import (
"github.com/kelseyhightower/envconfig"
)
type DbConfig struct {
type dbConfig struct {
Host string `envconfig:"DB_HOST"`
Port int `envconfig:"DB_PORT"`
}
type AppConfig struct {
type appConfig struct {
Port int `envconfig:"APP_PORT"`
}
type SentryConfig struct {
type sentryConfig struct {
DSN string `envconfig:"SENTRY_DSN"`
}
// ...
type Config struct {
Db DbConfig
App AppConfig
Sentry SentryConfig
Db dbConfig
App appConfig
Sentry sentryConfig
}
func NewConfig() *Config {

Loading…
Cancel
Save