code: func setEnv(cmd *exec.Cmd, envs map[string]string) {
  	env := os.Environ()
  	cmd.Env = make([]string, 0, len(env)+len(envs))
  outer:
  	for _, e := range env {
  		for k := range envs {
  			if strings.HasPrefix(e, k+"=") {
  				continue outer
  			}
  		}
  		cmd.Env = append(cmd.Env, e)
  	}
  	for k, v := range envs {
  		cmd.Env = append(cmd.Env, k+"="+v)
  	}
  }
docs: // setEnv sets the given environment variables for the command, ensuring they
  // are only set once.