1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00
cowyo/vendor/github.com/shurcooL/go/osutil/environ_test.go
2017-10-03 14:43:55 -04:00

18 lines
274 B
Go

package osutil_test
import (
"os"
"os/exec"
"github.com/shurcooL/go/osutil"
)
func ExampleEnviron() {
cmd := exec.Command("example")
env := osutil.Environ(os.Environ())
env.Set("USER", "gopher")
env.Set("HOME", "/usr/gopher")
env.Unset("TMPDIR")
cmd.Env = env
}