Commit d05bbb83 authored by Brian Tiger Chow's avatar Brian Tiger Chow

add async

parent 9239a1d1
...@@ -118,7 +118,7 @@ func run(ipfsPath, watchPath string) error { ...@@ -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 { ...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment