summaryrefslogtreecommitdiff
path: root/src/syscall/env_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/env_windows.go')
-rw-r--r--src/syscall/env_windows.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/syscall/env_windows.go b/src/syscall/env_windows.go
index 420b38724..bc21690d9 100644
--- a/src/syscall/env_windows.go
+++ b/src/syscall/env_windows.go
@@ -47,6 +47,14 @@ func Setenv(key, value string) error {
return nil
}
+func Unsetenv(key string) error {
+ keyp, err := UTF16PtrFromString(key)
+ if err != nil {
+ return err
+ }
+ return SetEnvironmentVariable(keyp, nil)
+}
+
func Clearenv() {
for _, s := range Environ() {
// Environment variables can begin with =