递归改栈

This commit is contained in:
huangsimin 2020-04-17 15:05:41 +08:00
parent 61d86bebc7
commit 44ea755873
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)
}