From 85170b5b7e6b2dd78b9c0c759fad8ad8e7e7fa68 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Fri, 10 Apr 2020 11:23:49 +0800 Subject: [PATCH] fix: path() is fixed --- hunter.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hunter.go b/hunter.go index 017f3b5..8b3f467 100644 --- a/hunter.go +++ b/hunter.go @@ -117,13 +117,9 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) { tasknode.SetID(sautoid) cxt.current = tasknode - task := tasknode.Task() + cxt.current.SetPath(cxt.parent.Path()) // - // if itid, ok := task.(IIdentity); ok { - // ncxt.curTaskID = itid.GetID() - // } else { - // ncxt.curTaskID = sautoid - // } + task := tasknode.Task() if before, ok := task.(IBefore); ok { before.Before(cxt) @@ -135,8 +131,8 @@ func (hunter *Hunter) recursionTasks(cxt *TaskContext) { after.After(cxt) } - tasknode.SetPath(cxt.parent.Path() + "." + cxt.TaskID()) ncxt.parent = cxt.current + ncxt.parent.SetPath(ncxt.parent.Path() + "." + ncxt.parent.TaskID()) //补正ncxt的路径 ncxt.hunter = cxt.hunter hunter.recursionTasks(ncxt)