This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://stackoverflow.com/questions/39320371/how-start-web-server-to-open-page-in-browser-in-golang | |
// open opens the specified URL in the default browser of the user. | |
func open(url string) error { | |
var cmd string | |
var args []string | |
switch runtime.GOOS { | |
case "windows": | |
cmd = "cmd" | |
args = []string{"/c", "start"} |