Automatically open web browser on startup

This commit is contained in:
Justin Hawkins 2017-07-27 22:04:47 +09:30
parent e240f5dbd0
commit 4619bb5383

4
dau.go
View File

@ -22,6 +22,7 @@ import (
"github.com/fogleman/gg" "github.com/fogleman/gg"
"github.com/pborman/getopt" "github.com/pborman/getopt"
"github.com/skratchdot/open-golang/open"
"golang.org/x/image/font/inconsolata" "golang.org/x/image/font/inconsolata"
"discord-auto-upload/web" "discord-auto-upload/web"
@ -49,6 +50,9 @@ func main() {
wconfig := web.Init() wconfig := web.Init()
go processWebChanges(wconfig) go processWebChanges(wconfig)
log.Print("Opening web browser")
open.Start("http://localhost:9090")
checkUpdates() checkUpdates()
log.Print("Waiting for images to appear in ", config.path) log.Print("Waiting for images to appear in ", config.path)