mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
Watch current directory and ignore non-go files.
This commit is contained in:
parent
859c694ce7
commit
8cbca4826e
4
run.go
4
run.go
@ -82,7 +82,9 @@ func runApp(cmd *Command, args []string) {
|
|||||||
paths = append(paths,
|
paths = append(paths,
|
||||||
path.Join(crupath, conf.DirStruct.Controllers),
|
path.Join(crupath, conf.DirStruct.Controllers),
|
||||||
path.Join(crupath, conf.DirStruct.Models),
|
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.DirStruct.Others...)
|
||||||
paths = append(paths, conf.MainFiles.Others...)
|
paths = append(paths, conf.MainFiles.Others...)
|
||||||
|
|
||||||
|
2
watch.go
2
watch.go
@ -139,7 +139,7 @@ func checkTMPFile(name string) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkIsGoFile return true if the name is HasSuffix go
|
// checkIsGoFile returns true if the name HasSuffix ".go".
|
||||||
func checkIsGoFile(name string) bool {
|
func checkIsGoFile(name string) bool {
|
||||||
if strings.HasSuffix(name, ".go") {
|
if strings.HasSuffix(name, ".go") {
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user