diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2021-08-02 20:10:23 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2021-08-02 20:10:23 -0400 |
| commit | a5a49ff08056a67cc57435f219aa157342a0d9a0 (patch) | |
| tree | 51ee855413f91c68fac91e6bd62271e1752afd55 /cmd/web/windows.go | |
| parent | 50da303c65674d076b3ea2e9c2fee20dbc7c277c (diff) | |
| download | steam-export-a5a49ff08056a67cc57435f219aa157342a0d9a0.tar.gz steam-export-a5a49ff08056a67cc57435f219aa157342a0d9a0.tar.xz | |
Compatibility with MacOS. Starting browsers is now a bit simplier on each platform.
Diffstat (limited to 'cmd/web/windows.go')
| -rw-r--r-- | cmd/web/windows.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cmd/web/windows.go b/cmd/web/windows.go index f59761a..76491f1 100644 --- a/cmd/web/windows.go +++ b/cmd/web/windows.go @@ -2,15 +2,11 @@ package main -import ( - "os/exec" - "time" -) - +// DefaultLib path for the operating system in question var DefaultLib string = `C:\Program Files (x86)\Steam\steamapps` -func startBrowser() { - time.Sleep(time.Second * 3) - c := exec.Command("cmd", "/c", "start", "http://127.0.0.1"+Listen) - Logger.Printf("Running command: %s", c.Run()) +// 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{"cmd", "/c", "start", url} } |
