From a5a49ff08056a67cc57435f219aa157342a0d9a0 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Mon, 2 Aug 2021 20:10:23 -0400 Subject: Compatibility with MacOS. Starting browsers is now a bit simplier on each platform. --- cmd/web/unix.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmd/web/unix.go') diff --git a/cmd/web/unix.go b/cmd/web/unix.go index ba028ab..ba57e22 100644 --- a/cmd/web/unix.go +++ b/cmd/web/unix.go @@ -1,4 +1,4 @@ -// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris +// +build dragonfly freebsd linux nacl netbsd openbsd solaris package main @@ -7,9 +7,11 @@ import ( "path/filepath" ) +// DefaultLib path for the operating system in question var DefaultLib string = filepath.Join(os.Getenv("HOME"), ".steam/steam/steamapps") -// TODO -func startBrowser() { - return +// BrowserCommand returns a []string containing the command that will start the +// browser for a given url specific to the OS +func BrowserCommand(url string) []string { + return []string{"xdg-open", url} } -- cgit v1.2.3