add new set function

This commit is contained in:
Adrian Zürcher
2026-01-17 22:41:54 +01:00
parent 64744e218a
commit 96bfcb7d0e

4
env/enviroment.go vendored
View File

@@ -28,6 +28,10 @@ func (key EnvKey) GetValue() string {
return os.Getenv(string(key)) return os.Getenv(string(key))
} }
func (key EnvKey) SetValue(value string) {
os.Setenv(string(key), value)
}
func (key EnvKey) GetBoolValue() bool { func (key EnvKey) GetBoolValue() bool {
value := strings.ToLower(os.Getenv(string(key))) value := strings.ToLower(os.Getenv(string(key)))
return value == "true" || value == "1" return value == "true" || value == "1"