递归改栈
This commit is contained in:
parent
61d86bebc7
commit
44ea755873
|
@ -139,7 +139,7 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) {
|
|||
}
|
||||
|
||||
ncxt.parent = cxt.current
|
||||
ncxt.parent.SetPath(ncxt.parent.Path() + "." + ncxt.parent.TaskID()) //补正ncxt的路径
|
||||
ncxt.parent.SetPath(ncxt.parent.Path() + "/" + ncxt.parent.TaskID()) //补正ncxt的路径
|
||||
ncxt.hunter = cxt.hunter
|
||||
hunter.recursionTasks(ncxt)
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ type WebSub1 struct {
|
|||
}
|
||||
|
||||
func (web *WebSub1) Execute(cxt *TaskContext) {
|
||||
cxt.SetShare("test", cxt.Path()+"."+cxt.TaskID())
|
||||
cxt.SetShare("test", cxt.Path()+"/"+cxt.TaskID())
|
||||
}
|
||||
|
||||
func TestCaseWebSub(t *testing.T) {
|
||||
|
@ -94,7 +94,7 @@ func TestCaseWebSub(t *testing.T) {
|
|||
hunter.Execute()
|
||||
|
||||
content := hunter.GetShare("test").(string)
|
||||
if content != ".0.1" {
|
||||
if content != "/0/1" {
|
||||
t.Error(content)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user