Skip to content

Ergonomics improvements for Go#63

Open
dplyukhin wants to merge 4 commits into
mainfrom
go-ergo
Open

Ergonomics improvements for Go#63
dplyukhin wants to merge 4 commits into
mainfrom
go-ergo

Conversation

@dplyukhin

@dplyukhin dplyukhin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What was changed

  • Function Args param is now always positional, instead of being both positional and inside XXXOptions
  • Make the default nexus.function a typesafe unary func (see RestartWorkflow) and include a general untyped version under the name XXXWithArgs (see RestartWorkflowWithArgs)
  • Move non-function args into the XXXOptions struct for uniformity, and make the struct mandatory for extensibility
  • Make public API more idiomatic for optionals: treat default values as none and non-default values as some.
  • Replace Signal funcs with strings, since that's what they are in Go 🤡

dplyukhin added 3 commits July 8, 2026 15:49
* Args param is positional, not in Options
* Add a typesafe unary version of functions to use by default
* Move non-function args into the Options struct
* Made the Options struct mandatory for all operations
* Use default-punning to simplify passing optional data to an operation
@dplyukhin dplyukhin marked this pull request as ready for review July 8, 2026 20:21
@dplyukhin dplyukhin requested a review from a team as a code owner July 8, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant