修复. 递归的过程
This commit is contained in:
parent
4f924be982
commit
05e14a3f7c
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user