Skip to content

Commit

Permalink
missing fix regarding the way to get an environment variable when che…
Browse files Browse the repository at this point in the history
…cking a field that can be omitempty
  • Loading branch information
Nexucis committed Jan 27, 2022
1 parent 7cdbad2 commit 5e395af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lamenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (l *Lamenv) lookupTag(tag reflect.StructTag) ([]string, bool) {
func contains(parts []string) bool {
variable := buildEnvVariable(parts)
for _, e := range os.Environ() {
envSplit := strings.Split(e, "=")
envSplit := strings.SplitN(e, "=", 2)
if len(envSplit) != 2 {
continue
}
Expand Down

0 comments on commit 5e395af

Please sign in to comment.