blob: 31c20796ed81ee17a931f06c9ec5cd1066cdd374 (
plain) (
tree)
|
|
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)
}
|