Page MenuHomeMusing Studio

helpers_windows_test.go
No OneTemporary

helpers_windows_test.go

package cli
import (
"os"
"syscall"
)
// os.Clearenv() doesn't actually unset variables on Windows
// See: https://github.com/golang/go/issues/17902
func clearenv() {
for _, s := range os.Environ() {
for j := 1; j < len(s); j++ {
if s[j] == '=' {
keyp, _ := syscall.UTF16PtrFromString(s[0:j])
syscall.SetEnvironmentVariable(keyp, nil)
break
}
}
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 15, 10:04 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3491856

Event Timeline