From 3d41d4a4f06a7f8b931cb9c305b227d30cc86461 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 25 Mar 2021 14:32:58 +0100 Subject: [PATCH] only parse once --- envconf.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/envconf.go b/envconf.go index d468015..6b5e8fb 100644 --- a/envconf.go +++ b/envconf.go @@ -76,6 +76,9 @@ func (c *Config) DefineDefault(key string, val string, dtype DataType) { } func (c *Config) Parse() { + if c.parsed { + return + } c.parsed = true for k,v := range c.env { if v.empty {