Skip to content

Commit 71ce2dc

Browse files
authored
fix comments and grammar (#1959)
1 parent f55d382 commit 71ce2dc

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

contrib/tools/workflowcheck/determinism/checker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ func (p *PackageLookupCache) PackageNonDeterminisms(pkg *types.Package) PackageN
448448
if pkg == nil {
449449
return nil
450450
}
451-
// The import has to be done under lock too since it's not concurrency safe
451+
// The import must also be done under lock because it is not concurrency-safe
452452
p.packageNonDeterminismsLock.Lock()
453453
defer p.packageNonDeterminismsLock.Unlock()
454454
ret, exists := p.packageNonDeterminisms[pkg]

contrib/tools/workflowcheck/determinism/reason.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (r *ReasonFuncCall) String() string {
127127

128128
func (r *ReasonFuncCall) PackageName() string {
129129
pkgPrefixedName := r.FuncName
130-
// If there is a ending paren it's a method, take the receiver as the name
130+
// If there is an ending parenthesis, it's a method; take the receiver as the name
131131
if endParen := strings.Index(r.FuncName, ")"); endParen >= 0 {
132132
pkgPrefixedName = strings.TrimLeft(r.FuncName[:endParen], "(*")
133133
}

internal/error.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ type (
113113
//
114114
// NOTE: This option is supported by Temporal Server >= v1.24.2 older version will ignore this value.
115115
NextRetryDelay time.Duration
116-
// Category of the error. Maps to logging/metrics behaviours.
116+
// Category of the error. Maps to logging/metrics behaviors.
117117
Category ApplicationErrorCategory
118118
}
119119

@@ -356,7 +356,7 @@ var (
356356
)
357357

358358
// ApplicationErrorCategory sets the category of the error. The category of the error
359-
// maps to logging/metrics behaviours.
359+
// maps to logging/metrics behaviors.
360360
//
361361
// Exposed as: [go.temporal.io/sdk/temporal.ApplicationErrorCategory]
362362
type ApplicationErrorCategory int

internal/headers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type (
4040

4141
// ContextAware is an optional interface that can be implemented alongside
4242
// DataConverter. This interface allows Temporal to pass Workflow/Activity
43-
// contexts to the DataConverter so that it may tailor it's behaviour.
43+
// contexts to the DataConverter so that it may tailor its behavior.
4444
//
4545
// Note that data converters may be called in non-context-aware situations to
4646
// convert payloads that may not be customized per context. Data converter

internal/internal_flags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ func (f sdkFlag) isValid() bool {
5959
// sdkFlags represents all the flags that are currently set in a workflow execution.
6060
type sdkFlags struct {
6161
capabilities *workflowservice.GetSystemInfoResponse_Capabilities
62-
// Flags that have been recieved from the server
62+
// Flags that have been received from the server
6363
currentFlags map[sdkFlag]bool
6464
// Flags that have been set this WFT that have not been sent to the server.
65-
// Keep track of them sepratly so we know what to send to the server.
65+
// Keep track of them separately so we know what to send to the server.
6666
newFlags map[sdkFlag]bool
6767
}
6868

@@ -123,7 +123,7 @@ func (sf *sdkFlags) gatherNewSDKFlags() []sdkFlag {
123123
}
124124

125125
// SetUnblockSelectorSignal toggles the flag to unblock the selector signal.
126-
// For test use only,
126+
// For test use only.
127127
func SetUnblockSelectorSignal(unblockSignal bool) {
128128
unblockSelectorSignal = unblockSignal
129129
}

internal/internal_task_handlers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ func (w *workflowExecutionContextImpl) Lock() {
581581
w.mutex.Lock()
582582
}
583583

584-
// Unlock cleans up after the provided error and it's own internal view of the
584+
// Unlock cleans up after the provided error and its own internal view of the
585585
// workflow error state by clearing itself and removing itself from cache as
586586
// needed. It is an error to call this function without having called the Lock
587587
// function first and the behavior is undefined. Regardless of the error
@@ -591,7 +591,7 @@ func (w *workflowExecutionContextImpl) Unlock(err error) {
591591
if err != nil || w.err != nil || w.isWorkflowCompleted ||
592592
(w.wth.cache.MaxWorkflowCacheSize() <= 0 && !w.hasPendingLocalActivityWork()) {
593593
// TODO: in case of closed, it assumes the close command always succeed. need server side change to return
594-
// error to indicate the close failure case. This should be rare case. For now, always remove the cache, and
594+
// error to indicate the close failure case. This should be a rare case. For now, always remove the cache, and
595595
// if the close command failed, the next command will have to rebuild the state.
596596
if w.wth.cache.getWorkflowCache().Exist(w.workflowInfo.WorkflowExecution.RunID) {
597597
w.wth.cache.removeWorkflowContext(w.workflowInfo.WorkflowExecution.RunID)

temporal/error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func NewHeartbeatTimeoutError(details ...interface{}) error {
251251
}
252252

253253
// ApplicationErrorCategory sets the category of the error. The category of the error
254-
// maps to logging/metrics SDK behaviours, does not impact server-side logging/metrics.
254+
// maps to logging/metrics SDK behaviors and does not impact server-side logging/metrics.
255255
type ApplicationErrorCategory = internal.ApplicationErrorCategory
256256

257257
const (

test/integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4147,7 +4147,7 @@ func (ts *IntegrationTestSuite) testUpdateOrderingCancel(cancelWf bool) {
41474147
}()
41484148
}
41494149

4150-
// Server does not support admitted so we have to send the update in a seperate goroutine
4150+
// The server does not support admitted updates, so we send the update in a separate goroutine
41514151
time.Sleep(5 * time.Second)
41524152
// Now create a new worker on that same task queue to resume the work of the
41534153
// workflow

workflow/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Context = internal.Context
1414

1515
// ContextAware is an optional interface that can be implemented alongside
1616
// DataConverter. This interface allows Temporal to pass Workflow/Activity
17-
// contexts to the DataConverter so that it may tailor it's behaviour.
17+
// contexts to the DataConverter so that it may tailor its behavior.
1818
//
1919
// Note that data converters may be called in non-context-aware situations to
2020
// convert payloads that may not be customized per context. Data converter

workflow/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ deterministic and repeatable within an execution context.
103103
104104
Coroutine related constructs:
105105
106-
- [workflow.Go] : This is a replacement for the the go statement
106+
- [workflow.Go] : This is a replacement for the go statement
107107
- [workflow.Channel] : This is a replacement for the native chan type. Temporal
108108
provides support for both buffered and unbuffered channels
109109
- [workflow.Selector] : This is a replacement for the select statement
@@ -532,8 +532,8 @@ framework via [go.temporal.io/sdk/testsuite.WorkflowTestSuite]. Since every test
532532
our struct to hold an instance of the test environment. This will allow us to initialize the test environment in a
533533
setup method. For testing workflows we use a [go.temporal.io/sdk/testsuite.TestWorkflowEnvironment].
534534
535-
We then implement a SetupTest method to setup a new test environment before each test. Doing so ensure that each test
536-
runs in it's own isolated sandbox. We also implement an AfterTest function where we assert that all mocks we setup were
535+
We then implement a SetupTest method to set up a new test environment before each test. Doing so ensures that each test
536+
runs in its own isolated sandbox. We also implement an AfterTest function where we assert that all mocks we set up were
537537
indeed called by invoking s.env.AssertExpectations(s.T()).
538538
539539
Finally, we create a regular test function recognized by "go test" and pass the struct to suite.Run.

0 commit comments

Comments
 (0)