terraform/vendor/github.com/pkg/browser/browser_windows.go

17 lines
283 B
Go
Raw Normal View History

2019-07-09 21:06:20 +02:00
package browser
import (
"os/exec"
"strings"
"syscall"
)
func openBrowser(url string) error {
r := strings.NewReplacer("&", "^&")
return runCmd("cmd", "/c", "start", r.Replace(url))
}
func setFlags(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
}