mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 14:34:24 +08:00
add async
This commit is contained in:
@ -118,7 +118,7 @@ func run(ipfsPath, watchPath string) error {
|
|||||||
addTree(watcher, e.Name)
|
addTree(watcher, e.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func() {
|
proc.Go(func(p process.Process) {
|
||||||
file, err := os.Open(e.Name)
|
file, err := os.Open(e.Name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
@ -129,7 +129,7 @@ func run(ipfsPath, watchPath string) error {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
log.Printf("added %s... key: %s", e.Name, k)
|
log.Printf("added %s... key: %s", e.Name, k)
|
||||||
}()
|
})
|
||||||
}
|
}
|
||||||
case err := <-watcher.Errors:
|
case err := <-watcher.Errors:
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
Reference in New Issue
Block a user