Unsetenv in Go

Posted by GoDoc
Public (Editable by Users)

Unsetenv unsets a single environment variable.

Go
Edit
package main

import "os"

func main() {
	os.Setenv("TMPDIR", "/my/tmp")
	defer os.Unsetenv("TMPDIR")
}