From 2e787dac5c64bbd911b03d09bd63ace4445d0d5f Mon Sep 17 00:00:00 2001 From: Jwahir Sundai Date: Wed, 2 Oct 2024 16:01:31 -0500 Subject: [PATCH] adding snipsync to nexus go samples (#365) * adding snipsync * update snipstart titles --- nexus/caller/starter/main.go | 2 ++ nexus/caller/worker/main.go | 2 ++ nexus/caller/workflows.go | 2 ++ nexus/handler/app.go | 2 ++ nexus/handler/worker/main.go | 2 ++ nexus/options/cli.go | 2 ++ nexus/service/api.go | 2 ++ 7 files changed, 14 insertions(+) diff --git a/nexus/caller/starter/main.go b/nexus/caller/starter/main.go index a17022b0..1398f9aa 100644 --- a/nexus/caller/starter/main.go +++ b/nexus/caller/starter/main.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-caller-starter package main import ( @@ -48,3 +49,4 @@ func runWorkflow(c client.Client, workflow interface{}, args ...interface{}) { } log.Println("Workflow result:", result) } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/caller/worker/main.go b/nexus/caller/worker/main.go index ec9cdb77..e7cb3781 100644 --- a/nexus/caller/worker/main.go +++ b/nexus/caller/worker/main.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-caller-worker package main import ( @@ -33,3 +34,4 @@ func main() { log.Fatalln("Unable to start worker", err) } } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/caller/workflows.go b/nexus/caller/workflows.go index 962a234e..57d11e24 100644 --- a/nexus/caller/workflows.go +++ b/nexus/caller/workflows.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-caller-workflow package caller import ( @@ -41,3 +42,4 @@ func HelloCallerWorkflow(ctx workflow.Context, name string, language service.Lan return res.Message, nil } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/handler/app.go b/nexus/handler/app.go index 4c5606fc..d1fa6be8 100644 --- a/nexus/handler/app.go +++ b/nexus/handler/app.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-handler package handler import ( @@ -48,3 +49,4 @@ func HelloHandlerWorkflow(_ workflow.Context, input service.HelloInput) (service } return service.HelloOutput{}, fmt.Errorf("unsupported language %q", input.Language) } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/handler/worker/main.go b/nexus/handler/worker/main.go index c61abda2..7b4d30cf 100644 --- a/nexus/handler/worker/main.go +++ b/nexus/handler/worker/main.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-handler-worker package main import ( @@ -43,3 +44,4 @@ func main() { log.Fatalln("Unable to start worker", err) } } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/options/cli.go b/nexus/options/cli.go index 714b2a4c..684edb34 100644 --- a/nexus/options/cli.go +++ b/nexus/options/cli.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-cli package options import ( @@ -71,3 +72,4 @@ func ParseClientOptionFlags(args []string) (client.Options, error) { ConnectionOptions: connectionOptions, }, nil } +// @@@SNIPEND \ No newline at end of file diff --git a/nexus/service/api.go b/nexus/service/api.go index 78d683fe..0b68cdb8 100644 --- a/nexus/service/api.go +++ b/nexus/service/api.go @@ -1,3 +1,4 @@ +// @@@SNIPSTART samples-go-nexus-service package service const HelloServiceName = "my-hello-service" @@ -32,3 +33,4 @@ type HelloInput struct { type HelloOutput struct { Message string } +// @@@SNIPEND \ No newline at end of file