From 6d1d14d0aa0097218590c4d7abb424073a123d5f Mon Sep 17 00:00:00 2001 From: prosenjitjoy Date: Fri, 15 Sep 2023 03:48:06 +0600 Subject: [PATCH] configuration reader --- cleanenv/.env | 2 +- cleanenv/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cleanenv/.env b/cleanenv/.env index ba0eeee..fcaddec 100644 --- a/cleanenv/.env +++ b/cleanenv/.env @@ -2,4 +2,4 @@ port="5432" host="env_host" name="env_name" user="env_user" -# pass="env_pass" \ No newline at end of file +pass="env_pass" \ No newline at end of file diff --git a/cleanenv/main.go b/cleanenv/main.go index c258b12..e4effd0 100644 --- a/cleanenv/main.go +++ b/cleanenv/main.go @@ -12,7 +12,7 @@ type ConfigDatabase struct { Host string `yaml:"host" env:"host" env-default:"host" env-description:"server host"` Name string `yaml:"name" env:"name" env-default:"name" env-description:"database name"` User string `yaml:"user" env:"user" env-default:"user" env-description:"database user"` - Pass string `yaml:"pass" env:"pass" env-default:"pass" env-description:"database pass"` + Pass string `yaml:"pass" env:"pass" env-required:"true" env-description:"database pass"` } var cfg ConfigDatabase