func (p *Pipeline) Watch(watchDir string) (d string, err error) {
	d, err = AbsPath(watchDir)
	if err != nil {
		if p.Verbose {
			fmt.Fprintf(p.Werr, "> %v", err)
		}
		return
	}
	for _, w := range p.Watches {
		if w == d {
			return
		}
	}
	if p.Verbose && p.OSX {
		fmt.Fprintf(p.Wout, "OSX watches are always recursive and do not skip directories. Adding %v recursivly\n", d)
	}
	p.Watches = append(p.Watches, d)
	if p.watcher != nil {
		err = p.watcher.Add(d)
	}
	return
}
Watch adds a GOPATH relative or absolute path to watch
rejects invalid paths and ignores duplicates
package goauto
import (
	"errors"
	"fmt"
	"io"
	"os"
	"path/filepath"
	"time"
)
const (
	batchTick = 300 * time.Millisecond  
)
const (
	IgnoreHidden  = true
	IncludeHidden = false
)
const (
	Verbose = true
	Silent  = false
)
type Pipeline struct {
	Name       string
	Watches    []string
	Wout, Werr io.Writer
	Workflows  []Workflower
	Verbose    bool
	OSX        bool
	watcher    Watcher
	recDirs    map[string]bool
	events     <-chan ESlice
}
func NewPipeline(name string, verbose bool) *Pipeline {
	p := Pipeline{Name: name, Wout: os.Stdout, Werr: os.Stderr, Verbose: verbose}
	return &p
}