修复. 递归的过程
This commit is contained in:
parent
4f924be982
commit
05e14a3f7c
|
@ -116,7 +116,7 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
|
||||||
tasknode := itask.(ITaskNode)
|
tasknode := itask.(ITaskNode)
|
||||||
task := tasknode.Task()
|
task := tasknode.Task()
|
||||||
|
|
||||||
ncxt.curPath = cxt.parent.Path()
|
ncxt.curPath = cxt.current.Path()
|
||||||
if itid, ok := task.(IIdentity); ok {
|
if itid, ok := task.(IIdentity); ok {
|
||||||
ncxt.curTaskID = itid.GetID()
|
ncxt.curTaskID = itid.GetID()
|
||||||
} else {
|
} else {
|
||||||
|
@ -134,7 +134,7 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
|
||||||
after.After(cxt)
|
after.After(cxt)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasknode.SetPath(cxt.parent.Path() + "." + ncxt.curTaskID)
|
tasknode.SetPath(cxt.current.Path() + "." + ncxt.curTaskID)
|
||||||
ncxt.parent = cxt.current
|
ncxt.parent = cxt.current
|
||||||
ncxt.current = tasknode
|
ncxt.current = tasknode
|
||||||
hunter.recursionTasks(ncxt)
|
hunter.recursionTasks(ncxt)
|
||||||
|
|
|
@ -2,9 +2,14 @@ package hunter
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
log.Println("测试最好使用 docker run -p 80:80 kennethreitz/httpbin")
|
||||||
|
}
|
||||||
|
|
||||||
type WebGet struct {
|
type WebGet struct {
|
||||||
PreGetUrl
|
PreGetUrl
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user