hotfix(env): read some settings with case sensitivity

This commit is contained in:
Quentin McGaw
2023-05-30 12:46:10 +00:00
parent 47593928f9
commit 2c30984a10
18 changed files with 78 additions and 58 deletions

View File

@@ -10,7 +10,7 @@ import (
func (s *Source) ReadHealth() (health settings.Health, err error) {
health.ServerAddress = env.Get("HEALTH_SERVER_ADDRESS")
_, health.TargetAddress = s.getEnvWithRetro("HEALTH_TARGET_ADDRESS", "HEALTH_ADDRESS_TO_PING")
_, health.TargetAddress = s.getEnvWithRetro("HEALTH_TARGET_ADDRESS", []string{"HEALTH_ADDRESS_TO_PING"})
successWaitPtr, err := envToDurationPtr("HEALTH_SUCCESS_WAIT_DURATION")
if err != nil {
@@ -37,7 +37,7 @@ func (s *Source) ReadHealth() (health settings.Health, err error) {
}
func (s *Source) readDurationWithRetro(envKey, retroEnvKey string) (d *time.Duration, err error) {
envKey, value := s.getEnvWithRetro(envKey, retroEnvKey)
envKey, value := s.getEnvWithRetro(envKey, []string{retroEnvKey})
if value == "" {
return nil, nil //nolint:nilnil
}