标签:inf src 打开 func window alt imp cat http
/*
@Time : 2020/1/21
@Author : Max
@File : test
@Software: GoLand
*/
package main
import (
"os/exec"
"syscall"
)
func main() {
// 有GUI调用
exec.Command(`cmd`, `/c`, `start`, `https://www.cnblogs.com/MaxBaiSecurity/`).Start()
// 无GUI调用
cmd := exec.Command(`cmd`, `/c`, `start`, `hhttps://www.cnblogs.com/MaxBaiSecurity/`)
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
cmd.Start()
}
/*
@Time : 2020/1/21
@Author : Max
@File : test
@Software: GoLand
*/
package main
import (
"os/exec"
)
func main() {
exec.Command(`xdg-open`, `https://www.cnblogs.com/MaxBaiSecurity/`).Start()
}
package main
import (
"os/exec"
)
func main() {
exec.Command(`open`, `https://www.cnblogs.com/MaxBaiSecurity/`).Start()
}
标签:inf src 打开 func window alt imp cat http
原文地址:https://www.cnblogs.com/MaxBaiSecurity/p/12221952.html