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

Merge pull request #144 from yanyiwu/patch-1

Fix bug about issue #143
This commit is contained in:
astaxie 2015-12-11 00:33:34 +08:00
commit fa5d72e565

View File

@ -455,7 +455,7 @@ func packDirectory(excludePrefix []string, excludeSuffix []string,
func isBeegoProject(thePath string) bool { func isBeegoProject(thePath string) bool {
fh, _ := os.Open(thePath) fh, _ := os.Open(thePath)
fis, _ := fh.Readdir(-1) fis, _ := fh.Readdir(-1)
regex := regexp.MustCompile(`(?s)package main.*?import.*?\(.*?"github.com/astaxie/beego".*?\).*func main()`) regex := regexp.MustCompile(`(?s)package main.*?import.*?\(.*?github.com/astaxie/beego".*?\).*func main()`)
for _, fi := range fis { for _, fi := range fis {
if fi.IsDir() == false && strings.HasSuffix(fi.Name(), ".go") { if fi.IsDir() == false && strings.HasSuffix(fi.Name(), ".go") {
data, err := ioutil.ReadFile(path.Join(thePath, fi.Name())) data, err := ioutil.ReadFile(path.Join(thePath, fi.Name()))