From 44ea7558731f04951929d144a717f25cb0744348 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Fri, 17 Apr 2020 15:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=92=E5=BD=92=E6=94=B9=E6=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hunter.go | 2 +- hunter_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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) }