From 0d9372da1e781e54ce041b779ed159a89917e727 Mon Sep 17 00:00:00 2001 From: Bunchhieng Date: Tue, 6 Sep 2016 12:30:33 -0400 Subject: Open browser when starting the web app --- todo.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/todo.go b/todo.go index 5d6bc75..022ecbf 100644 --- a/todo.go +++ b/todo.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/fatih/color" + "github.com/skratchdot/open-golang/open" "github.com/gammons/todolist/todolist" ) @@ -129,6 +130,7 @@ func routeInput(command string, input string) { case "web": web := todolist.NewWebapp() fmt.Println("Now serving todolist web.\nHead to http://localhost:7890 to see your todo list!") + open.Start("http://localhost:7890") web.Run() } } -- cgit v1.3