mirror of
				https://github.com/beego/bee.git
				synced 2025-11-04 09:23:24 +00:00 
			
		
		
		
	fix: hasBeegoRegex
This commit is contained in:
		@@ -79,7 +79,7 @@ func IsInGOPATH(thePath string) bool {
 | 
				
			|||||||
// IsBeegoProject checks whether the current path is a Beego application or not
 | 
					// IsBeegoProject checks whether the current path is a Beego application or not
 | 
				
			||||||
func IsBeegoProject(thePath string) bool {
 | 
					func IsBeegoProject(thePath string) bool {
 | 
				
			||||||
	mainFiles := []string{}
 | 
						mainFiles := []string{}
 | 
				
			||||||
	hasBeegoRegex := regexp.MustCompile(`(?s)package main.*?import.*?\(.*?github.com/astaxie/beego".*?\).*func main()`)
 | 
						hasBeegoRegex := regexp.MustCompile(`(?s)package main.*?import.*?\(.*?github.com/astaxie/beego".*?\).*func main\(\)`)
 | 
				
			||||||
	c := make(chan error)
 | 
						c := make(chan error)
 | 
				
			||||||
	// Walk the application path tree to look for main files.
 | 
						// Walk the application path tree to look for main files.
 | 
				
			||||||
	// Main files must satisfy the 'hasBeegoRegex' regular expression.
 | 
						// Main files must satisfy the 'hasBeegoRegex' regular expression.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user