(url string)
| 250 | } |
| 251 | |
| 252 | func openBrowser(url string) { |
| 253 | var cmd *exec.Cmd |
| 254 | switch runtime.GOOS { |
| 255 | case "darwin": |
| 256 | cmd = exec.Command("open", url) |
| 257 | case "linux": |
| 258 | cmd = exec.Command("xdg-open", url) |
| 259 | case "windows": |
| 260 | cmd = exec.Command("rundll32", "url.dll,FileProtocolHandler", url) |
| 261 | default: |
| 262 | return |
| 263 | } |
| 264 | cmd.Run() //nolint:errcheck |
| 265 | } |