1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 07:30:50 +00:00

fix(Template): correct check error

This commit is contained in:
Viktor Vassilyev 2018-11-06 21:40:43 +06:00
parent 68b0bd98fd
commit aa6d0f9f0b
2 changed files with 2 additions and 2 deletions

2
fs.go
View File

@ -40,7 +40,7 @@ func walk(fs http.FileSystem, path string, info os.FileInfo, walkFn filepath.Wal
dir, err := fs.Open(path)
defer dir.Close()
if err == nil {
if err != nil {
err1 := walkFn(path, info, err)
if err1 != nil {
return err1

View File

@ -206,7 +206,7 @@ func BuildTemplate(dir string, files ...string) error {
return self.visit(path, f, err)
})
if err != nil {
fmt.Printf("filepath.Walk() returned %v\n", err)
fmt.Printf("Walk() returned %v\n", err)
return err
}
buildAllFiles := len(files) == 0