Skip to content

Commit

Permalink
remove setEnvs func
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelPalenzuelaDD committed Jun 28, 2024
1 parent 9fd896b commit 664d019
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions internal/civisibility/utils/ci_providers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@ import (
"testing"
)

func setEnvs(env map[string]string) func() {
restore := map[string]*string{}
for key, value := range env {
oldValue, ok := os.LookupEnv(key)
if ok {
restore[key] = &oldValue
} else {
restore[key] = nil
}
_ = os.Setenv(key, value)
}
return func() {
for key, value := range restore {
if value == nil {
_ = os.Unsetenv(key)
} else {
_ = os.Setenv(key, *value)
}
}
}
}

func sortJSONKeys(jsonStr string) string {
tmp := map[string]string{}
_ = json.Unmarshal([]byte(jsonStr), &tmp)
Expand Down

0 comments on commit 664d019

Please sign in to comment.