code: func startWatcher(paths []string, ch chan int) {
  	watcher, err := fsnotify.NewWatcher()
  	if err != nil {
  		beeLogger.Log.Fatalf("Could not start the watcher: %v", err)
  	}
  	defer watcher.Close()
  
  	// Feed the paths to the watcher
  	for _, path := range paths {
  		if err := watcher.Add(path); err != nil {
  			beeLogger.Log.Fatalf("Could not set a watch on path: %v", err)
  		}
  	}
  
  	for {
  		select {
  		case evt := <-watcher.Events:
  			build := true
  			if filepath.Ext(evt.Name) != ".go" {
  				continue
  			}
  
  			mt := utils.GetFileModTime(evt.Name)
  			if t := eventsModTime[evt.Name]; mt == t {
  				build = false
  			}
  			eventsModTime[evt.Name] = mt
  
  			if build {
  				go func() {
  					if verbose {
  						utils.Notify("Rebuilding application with the new changes", "bee")
  					}
  
  					// Wait 1s before re-build until there is no file change
  					scheduleTime := time.Now().Add(1 * time.Second)
  					time.Sleep(time.Until(scheduleTime))
  					_, err := buildDebug()
  					if err != nil {
  						utils.Notify("Build Failed: "+err.Error(), "bee")
  					} else {
  						ch <- 0 // Notify listeners
  					}
  				}()
  			}
  		case err := <-watcher.Errors:
  			if err != nil {
  				ch <- -1
  			}
  		}
  	}
  }
docs: // startWatcher starts the fsnotify watcher on the passed paths