diff --git a/run.go b/run.go index eeb23cb..a5cace4 100644 --- a/run.go +++ b/run.go @@ -82,7 +82,9 @@ func runApp(cmd *Command, args []string) { paths = append(paths, path.Join(crupath, conf.DirStruct.Controllers), path.Join(crupath, conf.DirStruct.Models), - path.Join(crupath, conf.MainFiles.Main)) + path.Join(crupath, "./")) // Current path. + // Because monitor files has some issues, we watch current directory + // and ignore non-go files. paths = append(paths, conf.DirStruct.Others...) paths = append(paths, conf.MainFiles.Others...) diff --git a/watch.go b/watch.go index 48881b3..6207e05 100644 --- a/watch.go +++ b/watch.go @@ -139,7 +139,7 @@ func checkTMPFile(name string) bool { return false } -// checkIsGoFile return true if the name is HasSuffix go +// checkIsGoFile returns true if the name HasSuffix ".go". func checkIsGoFile(name string) bool { if strings.HasSuffix(name, ".go") { return true