diff --git a/README.md b/README.md index 609a632..bd792e0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# xxl-job go-client -很多公司java与go开发共存,java中有xxl-job做为任务调度引擎,为此也出现了go客户端,使用起来比较简单: +# xxl-job-executor-go +很多公司java与go开发共存,java中有xxl-job做为任务调度引擎,为此也出现了go执行器(客户端),使用起来比较简单: # 支持 ``` 1.执行器注册 @@ -18,8 +18,8 @@ package main import ( - xxl "github.com/xxl-job/go-client" - "github.com/xxl-job/go-client/example/task" + xxl "github.com/xxl-job/xxl-job-executor-go" + "github.com/xxl-job/xxl-job-executor-go/example/task" "log" ) @@ -39,4 +39,4 @@ func main() { } ``` # see -github.com/xxl-job/go-client/example/ +github.com/xxl-job/xxl-job-executor-go/example/ diff --git a/example/main.go b/example/main.go index 131b4aa..7ada87e 100644 --- a/example/main.go +++ b/example/main.go @@ -1,8 +1,8 @@ package main import ( - xxl "github.com/xxl-job/go-client" - "github.com/xxl-job/go-client/example/task" + xxl "github.com/xxl-job/xxl-job-executor-go" + "github.com/xxl-job/xxl-job-executor-go/example/task" "log" ) diff --git a/example/task/panic.go b/example/task/panic.go index b1305a9..dcbf8d9 100644 --- a/example/task/panic.go +++ b/example/task/panic.go @@ -2,9 +2,10 @@ package task import ( "context" - xxl "github.com/xxl-job/go-client" + xxl "github.com/xxl-job/xxl-job-executor-go" ) func Panic(cxt context.Context, param *xxl.RunReq) (msg string) { panic("test panic") + return } diff --git a/example/task/test.go b/example/task/test.go index ea7c346..6c44b69 100644 --- a/example/task/test.go +++ b/example/task/test.go @@ -3,10 +3,10 @@ package task import ( "context" "fmt" - xxl "github.com/xxl-job/go-client" + xxl "github.com/xxl-job/xxl-job-executor-go" ) func Test(cxt context.Context, param *xxl.RunReq) (msg string) { - fmt.Println("test one task" + param.ExecutorHandler + " param:" + param.ExecutorParams + "log_id" + xxl.Int64ToStr(param.LogID)) + fmt.Println("test one task" + param.ExecutorHandler + " param:" + param.ExecutorParams + " log_id:" + xxl.Int64ToStr(param.LogID)) return "test done" } diff --git a/example/task/test2.go b/example/task/test2.go index ecfc2c4..e129f0d 100644 --- a/example/task/test2.go +++ b/example/task/test2.go @@ -3,7 +3,7 @@ package task import ( "context" "fmt" - xxl "github.com/xxl-job/go-client" + xxl "github.com/xxl-job/xxl-job-executor-go" "time" ) diff --git a/go.mod b/go.mod index 7030711..edfc0a2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/xxl-job/go-client +module github.com/xxl-job/xxl-job-executor-go go 1.14 diff --git a/util.go b/util.go index ef6ceab..87a4f02 100644 --- a/util.go +++ b/util.go @@ -71,4 +71,4 @@ func returnGeneral() []byte { } str, _ := json.Marshal(data) return str -} +} \ No newline at end of file