Skip to content

Commit

Permalink
env: use self directly in set
Browse files Browse the repository at this point in the history
  • Loading branch information
jrelvas-ipc committed Oct 24, 2023
1 parent 8018629 commit e0f46e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/config/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ type Environment map[string]string
// Set will only set the given environment key and value if it isn't already set
// within the Environment.
func (e *Environment) Set(key, value string) {
env := *e

if _, ok := env[key]; ok {
if _, ok := (*e)[key]; ok {
return
}
env[key] = value
(*e)[key] = value
}

func (e *Environment) Setenv() {
Expand Down

0 comments on commit e0f46e1

Please sign in to comment.