fix bug: module parse error (#97)

master
Keson 4 years ago committed by GitHub
parent 0dd8e27557
commit a5ce2c448e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -133,7 +133,7 @@ func Prepare(projectDir string, checkGrpcEnv bool) (*Project, error) {
func matchModule(data []byte) (string, error) { func matchModule(data []byte) (string, error) {
text := string(data) text := string(data)
re := regexp.MustCompile(`(?m)^\s*module\s+[a-z0-9/\-.]+$`) re := regexp.MustCompile(`(?m)^\s*module\s+[a-z0-9_/\-.]+$`)
matches := re.FindAllString(text, -1) matches := re.FindAllString(text, -1)
if len(matches) == 1 { if len(matches) == 1 {
target := matches[0] target := matches[0]

Loading…
Cancel
Save