1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

add async

This commit is contained in:
Brian Tiger Chow
2015-01-22 01:46:05 -08:00
parent 9239a1d11d
commit d05bbb83c4

View File

@ -118,7 +118,7 @@ func run(ipfsPath, watchPath string) error {
addTree(watcher, e.Name)
}
}
func() {
proc.Go(func(p process.Process) {
file, err := os.Open(e.Name)
if err != nil {
log.Println(err)
@ -129,7 +129,7 @@ func run(ipfsPath, watchPath string) error {
log.Println(err)
}
log.Printf("added %s... key: %s", e.Name, k)
}()
})
}
case err := <-watcher.Errors:
log.Println(err)