import sync fn go_with_anon_fn() { wg.add(1) spawn fn (mut wg sync.WaitGroup) { wg.done() }(mut wg) wg.wait() }