chore: minor changes (#2108)

This commit is contained in:
Ludovic Fernandez 2024-02-09 21:55:43 +01:00 committed by GitHub
parent b9b0412f7c
commit 7fe1796157
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 25 additions and 36 deletions

View file

@ -3,6 +3,7 @@ package tester
import (
"fmt"
"os"
"slices"
)
// EnvTest Environment variables manager for tests.
@ -143,10 +144,5 @@ func (e *EnvTest) Apply(envVars map[string]string) {
}
func (e *EnvTest) isManagedKey(varName string) bool {
for _, key := range e.keys {
if key == varName {
return true
}
}
return false
return slices.Contains(e.keys, varName)
}