(f func())
| 636 | } |
| 637 | |
| 638 | func doAsync(f func()) (wait func()) { |
| 639 | done := make(chan struct{}) |
| 640 | go func() { |
| 641 | defer close(done) |
| 642 | f() |
| 643 | }() |
| 644 | return func() { |
| 645 | <-done |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | // buildAppLinkURL returns the URL to open the app in the browser. |
| 650 | // It follows similar logic to the TypeScript implementation in site/src/utils/app.ts |