Something went wrong. Try again.
sloproxy
Something went wrong. Try again.
455 B · 20 lines
Go
at main
123456789101112131415161718192021package tui
import ( "os/exec" "runtime")
// openBrowser opens the specified URL in the user's default browser.func openBrowser(url string) error { switch runtime.GOOS { case "darwin": return exec.Command("open", url).Start() case "linux": return exec.Command("xdg-open", url).Start() case "windows": return exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start() default: return exec.Command("xdg-open", url).Start() }}