func RemoveWatchCreate(fname string) {
	remove(&watchInfo{
		op:    fsnotify.Create,
		fname: fname,
	})
}
RemoveWatch create signals the run goroutine to remove the watch for the input filename
package watch
import (
	"log"
	"os"
	"path/filepath"
	"sync"
	"syscall"
	"github.com/hpcloud/tail/util"
	"gopkg.in/fsnotify.v1"
)
type InotifyTracker struct {
	mux       sync.Mutex
	watcher   *fsnotify.Watcher
	chans     map[string]chan fsnotify.Event
	done      map[string]chan bool
	watchNums map[string]int
	watch     chan *watchInfo
	remove    chan *watchInfo
	error     chan error
}
type watchInfo struct {
	op    fsnotify.Op
	fname string
}
func (this *watchInfo) isCreate() bool {
	return this.op == fsnotify.Create
}
var (
	shared *InotifyTracker
	once  = sync.Once{}
	goRun = func() {
		shared = &InotifyTracker{
			mux:       sync.Mutex{},
			chans:     make(map[string]chan fsnotify.Event),
			done:      make(map[string]chan bool),
			watchNums: make(map[string]int),
			watch:     make(chan *watchInfo),
			remove:    make(chan *watchInfo),
			error:     make(chan error),
		}
		go shared.run()
	}
	logger = log.New(os.Stderr, "", log.LstdFlags)
)
func Watch(fname string) error {
	return watch(&watchInfo{
		fname: fname,
	})
}
func WatchCreate(fname string) error {
	return watch(&watchInfo{
		op:    fsnotify.Create,
		fname: fname,
	})
}
func watch(winfo *watchInfo) error {
	once.Do(goRun)
	winfo.fname = filepath.Clean(winfo.fname)
	shared.watch <- winfo
	return <-shared.error
}
func RemoveWatch(fname string) {
	remove(&watchInfo{
		fname: fname,
	})
}