From a5ce2c448efea9f2ca1aab0b75b4302d2f6de304 Mon Sep 17 00:00:00 2001 From: Keson Date: Wed, 23 Sep 2020 22:10:25 +0800 Subject: [PATCH] fix bug: module parse error (#97) --- tools/goctl/util/project/project.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/goctl/util/project/project.go b/tools/goctl/util/project/project.go index 587938bb..5cfc690a 100644 --- a/tools/goctl/util/project/project.go +++ b/tools/goctl/util/project/project.go @@ -133,7 +133,7 @@ func Prepare(projectDir string, checkGrpcEnv bool) (*Project, error) { func matchModule(data []byte) (string, error) { 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) if len(matches) == 1 { target := matches[0]