Do not add passed top level structure name to environment variables.

This commit is contained in:
2019-09-18 00:36:30 +05:00
parent 2b9eb769d6
commit 1e54436f69
3 changed files with 42 additions and 41 deletions

5
sec.go
View File

@@ -7,7 +7,6 @@ import (
"os"
"reflect"
"strconv"
"strings"
)
var (
@@ -75,7 +74,9 @@ func Parse(structure interface{}, config *Options) error {
}
// Parse structure.
composeTree(value, strings.ToUpper(value.Type().Name()))
// As this is a very first function launch we should not use any
// prefixes.
composeTree(value, "")
return parseEnv()
}