feat: support v3 format debugtalk.py when executing hrp run/boom

This commit is contained in:
xucong053
2022-05-27 17:23:37 +08:00
parent c2bcbfd07f
commit f984e002dc
32 changed files with 1386 additions and 67 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func (t *TemplateContent) parseGoContent(path string) error {
originalContent := string(content)
// parse imports
importSlice := t.Regexps.Import.FindAllStringSubmatch(originalContent, -1)
importSlice := t.Regexps.Imports.FindAllStringSubmatch(originalContent, -1)
if len(importSlice) != 0 {
imports := strings.Replace(importSlice[0][1], "\t", "", -1)
for _, elem := range strings.Split(imports, "\n") {
@@ -70,7 +70,7 @@ func (t *TemplateContent) parseGoContent(path string) error {
}
}
// parse import
importSlice = t.Regexps.Imports.FindAllStringSubmatch(originalContent, -1)
importSlice = t.Regexps.Import.FindAllStringSubmatch(originalContent, -1)
if len(importSlice) != 0 {
for _, elem := range importSlice {
t.Imports = append(t.Imports, strings.TrimSpace(elem[1]))