@@ -545,19 +545,17 @@ func SetUpdateHandler(ctx Context, updateName string, handler interface{}) error
545
545
return SetUpdateHandlerWithOptions (ctx , updateName , handler , UpdateHandlerOptions {})
546
546
}
547
547
548
- // SetUpdateHandlerWithOptions binds an update handler function to the specified
549
- // name such that update invocations specifying that name will invoke the
550
- // handler. The handler function can take as input any number of parameters so
551
- // long as they can be serialized/deserialized by the system. The handler can
552
- // take a [workflow.Context] as its first parameter but this is not required. The
553
- // update handler must return either a single error or a single serializable
554
- // object along with a single error. The update handler function is invoked in
555
- // the context of the workflow and thus is subject to the same restrictions as
556
- // workflow code, namely, the update handler must be deterministic. As with
557
- // other workflow code, update code is free to invoke and wait on the results of
558
- // activities. Update handler code is free to mutate workflow state.
559
- //
560
- // This registration can optionally specify (through UpdateHandlerOptions) an
548
+ // SetUpdateHandlerWithOptions binds an update handler function to the specified name such that
549
+ // update invocations specifying that name will invoke the handler. The handler function can take as
550
+ // input any number of parameters so long as they can be serialized/deserialized by the system. The
551
+ // handler must take a [workflow.Context] as its first parameter. The update handler must return
552
+ // either a single error or a single serializable object along with a single error. The update
553
+ // handler function is invoked in the context of the workflow and thus is subject to the same
554
+ // restrictions as workflow code, namely, the update handler must be deterministic. As with other
555
+ // workflow code, update code is free to invoke and wait on the results of activities. Update
556
+ // handler code is free to mutate workflow state.
557
+ //
558
+
561
559
// update validation function. If provided, this function will be invoked before
562
560
// the update handler itself is invoked and if this function returns an error,
563
561
// the update request will be considered to have been rejected and as such will
@@ -575,7 +573,7 @@ func SetUpdateHandler(ctx Context, updateName string, handler interface{}) error
575
573
// err := workflow.SetUpdateHandlerWithOptions(
576
574
// ctx,
577
575
// "add",
578
- // func(val int) (int, error) { // Calls
576
+ // func(ctx workflow.Context, val int) (int, error) { // Calls
579
577
// counter += val // note that this mutates workflow state
580
578
// return counter, nil
581
579
// },
0 commit comments