What are you trying to do? I don't see the point in a shiny program that doesn't even create a window. There's likely a loop internally in the driver that's handling processing of events from the OS and since you're never creating a window, it's never exiting (this is just a guess, I haven't looked at the code lately.)
Have you looked at the samples in https://github.com/golang/exp/tree/master/shiny/example? They're likely a better place to start. On Thu, Sep 7, 2017 at 12:32 PM, <hani...@gmail.com> wrote: > I'm using shiny for a small internal project and noticed that driver.Main > doesn't seem to return. > > The documentation for: > > func Main(f func(screen.Screen)) > > in golang.org/x/exp/shiny/driver sates that "It returns when f returns." > > But when I run this: > > package main > > import ( > "fmt" > > "golang.org/x/exp/shiny/driver" > "golang.org/x/exp/shiny/screen" > ) > > func main() { > fmt.Println("Starting.") > driver.Main(func(s screen.Screen) { > fmt.Println("I'm printed; you can see me.") > return > }) > fmt.Println("I'm not printed; alas, I can't be seen.") > } > > on a MacBook Pro running macOS Sierra Version 10.12.6 and go1.9 darwin/amd64 > that last print statement is not called. It's as though os.Exit, or an > equivalent, is being called somewhere within driver.Main and below, though I > can't seem to find any such call in the source. > > I've tried to do a web search for this but didn't get any useful links > either. I understand that shiny is experimental and that development has > paused recently, but I'm just trying to understand what's going on. > > Any help is very much appreciated! > > William > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- - Dave -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.