Skip to content

Commit 9f3a0ab

Browse files
committed
Make workflow private
1 parent 10c0105 commit 9f3a0ab

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

workflow/executor/executor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ func (e *executor) handleWorkflowExecutionStarted(a *history.ExecutionStartedAtt
391391
return fmt.Errorf("workflow %s not found", a.Name)
392392
}
393393

394-
e.workflow = NewWorkflow(reflect.ValueOf(wfFn))
394+
e.workflow = newWorkflow(reflect.ValueOf(wfFn))
395395

396396
return e.workflow.Execute(e.workflowCtx, a.Inputs)
397397
}

workflow/executor/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type workflow struct {
1919
err error
2020
}
2121

22-
func NewWorkflow(workflowFn reflect.Value) *workflow {
22+
func newWorkflow(workflowFn reflect.Value) *workflow {
2323
s := sync.NewScheduler()
2424

2525
return &workflow{

workflow/executor/workflow_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func Test_Workflow_WrapsPanic(t *testing.T) {
2525
ctx := sync.Background()
2626
ctx = contextvalue.WithConverter(ctx, converter.DefaultConverter)
2727

28-
wf := NewWorkflow(reflect.ValueOf(w))
28+
wf := newWorkflow(reflect.ValueOf(w))
2929
err := wf.Execute(ctx, nil)
3030
require.NoError(t, err)
3131

0 commit comments

Comments
 (0)