I am using systray and open to open chrome browser on a url (mostly served by the golang server itself…), e.g.:
func main() {
fmt.Println("Quando Go Server started")
...
go server.ServeHTTPandIO(handlers)
systray.Run(onReady, nil)
}
func onReady() {
systray.SetIcon(icon.Data())
systray.SetTitle("Quando")
systray.SetTooltip("Quando - noCode Toolset")
sysEditor := systray.AddMenuItem("Editor", "Open Editor")
sysClient := systray.AddMenuItem("Client", "Open Client")
systray.AddSeparator()
sysDashboard := systray.AddMenuItem("Dashboard", "Open Dashboard")
systray.AddSeparator()
sysGithub := systray.AddMenuItem("Quando:Github", "Open Quando -> Github")
systray.AddSeparator()
sysQuit := systray.AddMenuItem("Quit", "Stop the server")
go func() {
for {
select {
case <-sysQuit.ClickedCh:
fmt.Println("Exiting...")
systray.Quit()
case <-sysEditor.ClickedCh:
open.StartWith("http://127.0.0.1/editor", "chrome")
case <-sysClient.ClickedCh:
open.StartWith("http://127.0.0.1/client", "chrome")
case <-sysDashboard.ClickedCh:
open.StartWith("http://127.0.0.1", "chrome")
case <-sysGithub.ClickedCh:
open.Start("https://github.com/andrewfstratton/quando")
}
}
}()
However, there doesn’t seem to be any way to pass in command line parameters - I would like to pass in ‘–allow-insecure-localhost’.
Does anyone know of a (cross platform) package/option similar to open-lang open that allows specifying the application as chrome AND passing parameters
Note: I know that lorca does this - but also provides much more than I need…I am considering stripping ‘LocateChrome’ from lorca and using that…
Thank you in advance - Andy