diff --git a/hunter.go b/hunter.go index e7d6d97..83b7e23 100644 --- a/hunter.go +++ b/hunter.go @@ -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) diff --git a/hunter_test.go b/hunter_test.go index 0cd641b..6321928 100644 --- a/hunter_test.go +++ b/hunter_test.go @@ -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) }