INNER CODE UNIT · Go

openBrowser

openocta/openocta · src/cmd/openocta-launcher/main.go:87

func openBrowser(url string) error {
	switch runtime.GOOS {
	case "darwin":
		return exec.Command("open", url).Start()
	case "windows":
		// Use cmd start to open the default browser.
		return exec.Command("cmd", "/c", "start", "", url).Start()
	default:
		// linux and others
		if _, err := exec.LookPath("xdg-open"); err == nil {
			return exec.Command("xdg-open", url).Start()
		}
	}
	return nil
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…