diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-08-18 13:29:54 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-08-18 13:29:54 +0300 |
commit | fd70f95224374d23157ee7c0357733102cd0df53 (patch) | |
tree | e490c12e021cedaf211b292d5d623baa32a673fc /pkg/config |
Diffstat (limited to 'pkg/config')
-rw-r--r-- | pkg/config/config.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go new file mode 100644 index 0000000..b745a60 --- /dev/null +++ b/pkg/config/config.go @@ -0,0 +1,16 @@ +package config + +import "os" + +type Config struct { + DBPath string + Listen string +} + +func New() *Config { + cfg := new(Config) + cfg.DBPath = os.Getenv("DB_PATH") + cfg.Listen = os.Getenv("LISTEN") + + return cfg +} |