Skip to content

Commit

Permalink
Rearrange to make diff more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Nov 29, 2024
1 parent d589366 commit 7b0f0cc
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions internal/internal_workflow_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,29 @@ type workflowClientInterceptor struct {
client *WorkflowClient
}

func createStartWorkflowInput(
options StartWorkflowOptions,
workflow interface{},
args []interface{},
registry *registry,
) (*ClientExecuteWorkflowInput, error) {
if options.ID == "" {
options.ID = uuid.New()
}
if err := validateFunctionArgs(workflow, args, true); err != nil {
return nil, err
}
workflowType, err := getWorkflowFunctionName(registry, workflow)
if err != nil {
return nil, err
}
return &ClientExecuteWorkflowInput{
Options: &options,
WorkflowType: workflowType,
Args: args,
}, nil
}

func (w *workflowClientInterceptor) createStartWorkflowRequest(
ctx context.Context,
in *ClientExecuteWorkflowInput,
Expand Down Expand Up @@ -1697,29 +1720,6 @@ func (w *workflowClientInterceptor) ExecuteWorkflow(
}, nil
}

func createStartWorkflowInput(
options StartWorkflowOptions,
workflow interface{},
args []interface{},
registry *registry,
) (*ClientExecuteWorkflowInput, error) {
if options.ID == "" {
options.ID = uuid.New()
}
if err := validateFunctionArgs(workflow, args, true); err != nil {
return nil, err
}
workflowType, err := getWorkflowFunctionName(registry, workflow)
if err != nil {
return nil, err
}
return &ClientExecuteWorkflowInput{
Options: &options,
WorkflowType: workflowType,
Args: args,
}, nil
}

func (w *workflowClientInterceptor) UpdateWithStartWorkflow(
ctx context.Context,
updateInput *ClientUpdateWorkflowInput,
Expand Down

0 comments on commit 7b0f0cc

Please sign in to comment.