mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
feat: support v3 format debugtalk.py when executing hrp run/boom
This commit is contained in:
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user