package config import ( "git.neonxp.ru/neonxp/guessr/pkg/db" "github.com/caarlos0/env/v11" ) type Config struct { Listen string `env:"LISTEN"` Debug bool `env:"DEBUG"` Keys []string `env:"KEYS"` DB *db.Config } func New() (*Config, error) { cfg := &Config{ Listen: ":8000", DB: &db.Config{}, } return cfg, env.Parse(cfg) }