Skip to content

Commit

Permalink
fix bug: module parse error (zeromicro#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
Keson authored Sep 23, 2020
1 parent 0dd8e27 commit a5ce2c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/goctl/util/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit a5ce2c4

Please sign in to comment.