1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 20:20:55 +00:00

skip start with . dir

This commit is contained in:
astaxie 2016-01-08 11:04:05 +08:00
parent 7342e701e5
commit f0da7795a4

6
fix.go
View File

@ -29,8 +29,14 @@ func runFix(cmd *Command, args []string) int {
} }
filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
if info.IsDir() { if info.IsDir() {
if strings.HasPrefix(info.Name(), ".") {
return filepath.SkipDir
}
return nil return nil
} }
if err != nil {
return err
}
ColorLog("%s\n", path) ColorLog("%s\n", path)
err = fixFile(path) err = fixFile(path)
if err != nil { if err != nil {