func main() { transport := browser.NewRestTransport() store := editor.NewRestDataStore(transport) app := editor.NewMainApplication(store) browser.Run(app) }
func main() { arguments, _ := docopt.Parse(usage(), nil, true, app.Title, false) addressArg := arguments["--address"] address := "localhost:8080" if addressArg != nil { address = addressArg.(string) } deferrer := make(chan func(), 100) defer close(deferrer) transport := native.NewRestTransport("http://"+address, deferrer) store := editor.NewRestDataStore(transport) app := editor.NewMainApplication(store) console.Run(app, deferrer) }