From f586843be3d00d3d52dd52a087ea0156c020d26e Mon Sep 17 00:00:00 2001 From: lalizita Date: Fri, 31 Mar 2023 09:15:53 -0300 Subject: Rename variable for disrectories --- golings/cmd/watch.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'golings') diff --git a/golings/cmd/watch.go b/golings/cmd/watch.go index 0ef9b57..01c8827 100644 --- a/golings/cmd/watch.go +++ b/golings/cmd/watch.go @@ -67,9 +67,9 @@ func WatchEvents(updateF chan<- string) { } path, _ := os.Getwd() - filePath := fmt.Sprintf("%s/exercises", path) + directories := fmt.Sprintf("%s/exercises", path) - err = filepath.WalkDir(filePath, func(path_dir string, d fs.DirEntry, err error) error { + err = filepath.WalkDir(directories, func(path_dir string, d fs.DirEntry, err error) error { if err != nil { log.Fatal(err) return err @@ -88,7 +88,6 @@ func WatchEvents(updateF chan<- string) { log.Fatal("Error in file path:", err.Error()) } - // Start listening for events. go func() { for event := range watcher.Events { if event.Has(fsnotify.Write) { -- cgit v1.2.3-70-g09d2