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

18 lines
274 B
Go
Raw Normal View History

2017-10-03 21:43:55 +03:00
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
}