修复. 递归的过程

This commit is contained in:
huangsimin 2020-04-09 10:06:16 +08:00
parent 4f924be982
commit 05e14a3f7c
2 changed files with 7 additions and 2 deletions

View File

@ -116,7 +116,7 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
tasknode := itask.(ITaskNode)
task := tasknode.Task()
ncxt.curPath = cxt.parent.Path()
ncxt.curPath = cxt.current.Path()
if itid, ok := task.(IIdentity); ok {
ncxt.curTaskID = itid.GetID()
} else {
@ -134,7 +134,7 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
after.After(cxt)
}
tasknode.SetPath(cxt.parent.Path() + "." + ncxt.curTaskID)
tasknode.SetPath(cxt.current.Path() + "." + ncxt.curTaskID)
ncxt.parent = cxt.current
ncxt.current = tasknode
hunter.recursionTasks(ncxt)

View File

@ -2,9 +2,14 @@ package hunter
import (
"encoding/json"
"log"
"testing"
)
func init() {
log.Println("测试最好使用 docker run -p 80:80 kennethreitz/httpbin")
}
type WebGet struct {
PreGetUrl
}