package webview import ( "flag" "log" "os" "testing" ) func Example() { w := New(true) defer w.Destroy() w.SetTitle("Hello") w.Bind("noop", func() string { log.Println("hello") return "hello" }) w.Bind("add", func(a, b int) int { return a + b }) w.Bind("quit", func() { w.Terminate() }) w.SetHtml(`
hello )`) w.Run() } func TestMain(m *testing.M) { flag.Parse() if testing.Verbose() { Example() } os.Exit(m.Run()) }