Skip to content

Instantly share code, notes, and snippets.

View mchampaneri's full-sized avatar
😎
Exploring open source

Manish Champaneri mchampaneri

😎
Exploring open source
View GitHub Profile
@hyg
hyg / gist:9c4afcd91fe24316cbf0
Created June 19, 2014 09:36
open browser in golang
func openbrowser(url string) {
var err error
switch runtime.GOOS {
case "linux":
err = exec.Command("xdg-open", url).Start()
case "windows":
err = exec.Command("rundll32", "url.dll,FileProtocolHandler", url).Start()
case "darwin":
err = exec.Command("open", url).Start()