From b1394b76a5f4036d4a1843770f6d1223aa92b7a8 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 25 Mar 2021 08:20:40 +0100 Subject: [PATCH] new directory --- envconf.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/envconf.go b/envconf.go index b5c30e4..d225e53 100644 --- a/envconf.go +++ b/envconf.go @@ -115,7 +115,14 @@ func (c *Config) GetInt(key string)(int64) { return 0 } func (c *Config) GetDirectory(key string)(string) { - return c.GetString(key) + if c.parsed { + upper := strings.ToUpper(key) + entry, ok := c.env[upper] + if ok { + return entry.parsed.strval + } + } + return "" } func (c *Config) GetString(key string)(string) { if c.parsed {