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/darwin.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cmd/web/darwin.go (limited to 'cmd/web/darwin.go') diff --git a/cmd/web/darwin.go b/cmd/web/darwin.go new file mode 100644 index 0000000..7330733 --- /dev/null +++ b/cmd/web/darwin.go @@ -0,0 +1,18 @@ +// +build darwin + +package main + +import ( + "os" + "path/filepath" +) + +// DefaultLib path for the operating system in question +var DefaultLib string = filepath.Join(os.Getenv("HOME"), + "Library/Application Support/Steam/steamapps") + +// 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{"open", url} +} -- cgit v1.2.3