mirror of
https://github.com/beego/bee.git
synced 2024-11-26 11:31:29 +00:00
skip start with . dir
This commit is contained in:
parent
7342e701e5
commit
f0da7795a4
6
fix.go
6
fix.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user