mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
18 lines
274 B
Go
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
|
|
}
|