tally/open_browser_darwin.go

14 lines
284 B
Go
Raw Permalink Normal View History

2021-05-08 21:53:33 +00:00
// This will build for osx without a build tag based on the filename
package main
2021-05-08 21:53:33 +00:00
import "os/exec"
func OpenInBrowser(url string) (string, error) {
err := exec.Command("open", url).Start()
if err != nil {
return "", err
}
return "Opened in system default web browser", nil
}