From 3a37ea3090e8f12f9eb27fe766dc064c02c486c0 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 18 Jun 2021 11:00:08 +0200 Subject: [PATCH] save file --- envconf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envconf.go b/envconf.go index 1093b71..b8cbf88 100644 --- a/envconf.go +++ b/envconf.go @@ -104,8 +104,8 @@ func (c *Config) Parse() { } for k, v := range c.env { if failed && (v.parsed.err == nil) { - if v.empty { - if v.unset { + if v.unset { + if v.empty { v.parsed.err = errors.New(fmt.Sprintf(`Environment variable "%s" not found. It should have been of type %s.`, k, v.dtype)) c.env[k] = v } else {