diff options
Diffstat (limited to 'libgo/go/syscall/env_windows.go')
-rw-r--r-- | libgo/go/syscall/env_windows.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgo/go/syscall/env_windows.go b/libgo/go/syscall/env_windows.go index 420b3872464..bc21690d9fd 100644 --- a/libgo/go/syscall/env_windows.go +++ b/libgo/go/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 = |