Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F12339414
helpers_windows_test.go
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
377 B
Subscribers
None
helpers_windows_test.go
View Options
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
Details
Attached
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
Attached To
rWAGTK writeas-gtk
Event Timeline
Log In to Comment