mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
os: implement and smoketest os.Unsetenv
This commit is contained in:
+6
-2
@@ -17,8 +17,12 @@ func Setenv(key, value string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func Unsetenv(_ string) error {
|
||||
return ErrNotImplemented
|
||||
func Unsetenv(key string) error {
|
||||
err := syscall.Unsetenv(key)
|
||||
if err != nil {
|
||||
return NewSyscallError("unsetenv", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func LookupEnv(key string) (string, bool) {
|
||||
|
||||
Reference in New Issue
Block a user