golang windows无GUI调用浏览器


package main

import (
"os/exec"
"syscall"
)

// open opens the specified URL in the default browser of the user.

func main() {
// GUI
cmd := exec.Command("cmd", "/c", "start", "https://tech.mojotv.cn")
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
cmd.Start()
}
 
原文地址:https://www.cnblogs.com/linzenews/p/14219014.html