Skip to content

Commit

Permalink
comment out dead code
Browse files Browse the repository at this point in the history
Signed-off-by: sriv <srikanth.ddit@gmail.com>
  • Loading branch information
sriv committed Jun 29, 2021
1 parent 47c71f8 commit 1ae219e
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions api/infoGatherer/specDetails.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
package infoGatherer

import (
"io/ioutil"
"sync"

"github.com/fsnotify/fsnotify"
"github.com/getgauge/gauge-proto/go/gauge_messages"
"github.com/getgauge/gauge/gauge"
"github.com/getgauge/gauge/logger"
Expand Down Expand Up @@ -598,21 +596,21 @@ func handleParseFailures(parseResults []*parser.ParseResult) {
}
}

func addDirToFileWatcher(watcher *fsnotify.Watcher, dir string) {
err := watcher.Add(dir)
if err != nil {
logger.Errorf(false, "Unable to add directory %v to file watcher: %s", dir, err.Error())
} else {
logger.Debugf(false, "Watching directory: %s", dir)
files, _ := ioutil.ReadDir(dir)
logger.Debugf(false, "Found %d files", len(files))
}
}
// func addDirToFileWatcher(watcher *fsnotify.Watcher, dir string) {
// err := watcher.Add(dir)
// if err != nil {
// logger.Errorf(false, "Unable to add directory %v to file watcher: %s", dir, err.Error())
// } else {
// logger.Debugf(false, "Watching directory: %s", dir)
// files, _ := ioutil.ReadDir(dir)
// logger.Debugf(false, "Found %d files", len(files))
// }
// }

func removeWatcherOn(watcher *fsnotify.Watcher, path string) {
logger.Debugf(false, "Removing watcher on : %s", path)
err := watcher.Remove(path)
if err != nil {
logger.Errorf(false, "Unable to remove watcher on: %s. %s", path, err.Error())
}
}
// func removeWatcherOn(watcher *fsnotify.Watcher, path string) {
// logger.Debugf(false, "Removing watcher on : %s", path)
// err := watcher.Remove(path)
// if err != nil {
// logger.Errorf(false, "Unable to remove watcher on: %s. %s", path, err.Error())
// }
// }

0 comments on commit 1ae219e

Please sign in to comment.