From ea11a06c24d750013d69da2aaa143ae4a195f5f8 Mon Sep 17 00:00:00 2001 From: Alex Shtin Date: Mon, 23 Mar 2020 16:30:22 -0700 Subject: [PATCH] Fix README.md and lint errors (#74) --- CONTRIBUTING.md | 7 +++---- README.md | 10 +++++----- internal/interceptors.go | 5 +++-- internal/worker.go | 4 ++-- test/workflow_test.go | 7 +------ 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3c3c0d759..b548788dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Developing temporal-sdk +# Developing Temporal Go SDK -This doc is intended for contributors to `temporal-client` (hopefully that's you!) +This doc is intended for contributors to `temporal-go-sdk` (hopefully that's you!) **Note:** All contributors also need to fill out the [Temporal Contributor License Agreement](https://gist.github.com/samarabbas/7dcd41eb1d847e12263cc961ccfdb197) before we can merge in any of your changes @@ -10,12 +10,11 @@ This doc is intended for contributors to `temporal-client` (hopefully that's you ## Checking out the code -Make sure the repository is cloned to the correct location: +Make sure the repository is cloned to the preferred location: (Note: the path is `go.temporal.io/temporal/` instead of github repo) ```bash go get go.temporal.io/temporal/... -cd $GOPATH/src/go.temporal.io/temporal ``` ## Licence headers diff --git a/README.md b/README.md index 00a34fddf..d68a2ad28 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ [Temporal](https://github.com/temporalio/temporal) is a distributed, scalable, durable, and highly available orchestration engine used to execute asynchronous long-running business logic in a scalable and resilient way. -`temporal-client` is the framework for authoring workflows and activities. +`temporal-go-sdk` is the framework for authoring workflows and activities using Go language. ## How to use -Make sure you clone this repo into the correct location. +Clone this repo into the preferred location. ```bash -git clone git@github.com:temporalio/temporal-go-client.git $GOPATH/src/go.temporal.io/temporal +git clone git@github.com:temporalio/temporal-go-sdk.git ``` or @@ -20,11 +20,11 @@ go get go.temporal.io/temporal See [samples](https://github.com/temporalio/temporal-go-samples) to get started. -Documentation is available [here](https://cadenceworkflow.io/docs/07_goclient/). +Documentation is available [here](https://docs.temporal.io/docs/07_goclient/). You can also find the API documentation [here](https://godoc.org/go.temporal.io/temporal). ## Contributing -We'd love your help in making the Temporal Go client great. Please review our [contribution guidelines](CONTRIBUTING.md). +We'd love your help in making the Temporal Go SDK great. Please review our [contribution guidelines](CONTRIBUTING.md). ## License MIT License, please see [LICENSE](LICENSE) for details. diff --git a/internal/interceptors.go b/internal/interceptors.go index 79e812ded..d5971315e 100644 --- a/internal/interceptors.go +++ b/internal/interceptors.go @@ -21,10 +21,11 @@ package internal import ( - "github.com/uber-go/tally" "time" + + "github.com/uber-go/tally" + "go.uber.org/zap" ) -import "go.uber.org/zap" // WorkflowInterceptorFactory is used to create a single link in the interceptor chain type WorkflowInterceptorFactory interface { diff --git a/internal/worker.go b/internal/worker.go index 9a5c80d10..7eb2ec536 100644 --- a/internal/worker.go +++ b/internal/worker.go @@ -71,7 +71,7 @@ type ( TaskListActivitiesPerSecond float64 // Optional: Sets the maximum number of goroutines that will concurrently poll the - // cadence-server to retrieve activity tasks. Changing this value will affect the + // temporal-server to retrieve activity tasks. Changing this value will affect the // rate at which the worker is able to consume tasks from a task list. // default: 2 MaxConcurrentActivityTaskPollers int @@ -88,7 +88,7 @@ type ( WorkerDecisionTasksPerSecond float64 // Optional: Sets the maximum number of goroutines that will concurrently poll the - // cadence-server to retrieve decision tasks. Changing this value will affect the + // temporal-server to retrieve decision tasks. Changing this value will affect the // rate at which the worker is able to consume tasks from a task list. // default: 2 MaxConcurrentDecisionTaskPollers int diff --git a/test/workflow_test.go b/test/workflow_test.go index 9b29a7201..966245f18 100644 --- a/test/workflow_test.go +++ b/test/workflow_test.go @@ -422,12 +422,7 @@ func (w *Workflows) ConsistentQueryWorkflow(ctx workflow.Context, delay time.Dur ScheduleToCloseTimeout: 5 * time.Second, }) - workflowInfo := internal.GetWorkflowInfo(laCtx) - if &workflowInfo.WorkflowType == nil { - return errors.New("failed to get work flow type") - } - - workflow.ExecuteLocalActivity(laCtx, LocalSleep, delay).Get(laCtx, nil) + _ = workflow.ExecuteLocalActivity(laCtx, LocalSleep, delay).Get(laCtx, nil) queryResult = signalData return nil }