title: Watch recursive directories in go-inotify
body: <p>I am using this go library <a href="https://godoc.org/golang.org/x/exp/inotify" rel="nofollow">https://godoc.org/golang.org/x/exp/inotify</a> for file and folder watcher in Linux inotify when we use directly in Linux it gives one parameter to be passed to watch recursive directories i.e. --r but in this wrapper how do I specify while calling the function.</p>
  
  <pre><code>package main
  
  import (
  "golang.org/x/exp/inotify"
  "log"
  )
  
  func main() {
    watcher, err := inotify.NewWatcher()
    if err != nil {
        log.Fatal(err)
    }
    err = watcher.Watch("/home/minions")
    if err != nil {
        log.Fatal(err)
    }
    for {
        select {
        case ev := &lt;-watcher.Event:
            log.Println("event:", ev)
        case err := &lt;-watcher.Error:
            log.Println("error:", err)
        }
    }
  }
  </code></pre>
  
  <p>This is my go code.</p>