diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 03:46:18 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-05-27 03:46:51 -0400 |
commit | a831d1e2391e67f6d6ad3284ab9858d9b8d610c1 (patch) | |
tree | 4c8c5cf44f050f1c5e8875bf24958c92139ea476 /util.go | |
parent | ef00cf3e38b76395abe42d406c2bb06380754091 (diff) |
Implement fetch
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -49,3 +49,11 @@ func exitOnError(err error) { os.Exit(1) } } + +func async(cb func()) { + wg.Add(1) + go func() { + cb() + wg.Done() + }() +} |