GO opens the default browser of WINDOWS

First look at windows to open the default browser

start http://www.baidu.com

windows command run

Convert to go syntax

func Open(uri string) error {
    
    
	cmd := exec.Command("cmd","/C", "start "+uri)
	return cmd.Run()
}

func main() {
    
    
	Open("http://baidu.com")
}

Guess you like

Origin blog.csdn.net/qq_39164154/article/details/124547084