os: implement and smoketest os.Clearenv

This commit is contained in:
Dan Kegel
2021-12-11 11:53:02 -08:00
committed by Ron Evans
parent e4f2b9c003
commit 51fc78c100
4 changed files with 49 additions and 0 deletions
+5
View File
@@ -25,6 +25,11 @@ func Unsetenv(key string) error {
return nil
}
// Clearenv deletes all environment variables.
func Clearenv() {
syscall.Clearenv()
}
func LookupEnv(key string) (string, bool) {
return syscall.Getenv(key)
}