Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nil to be used for param functions #9

Closed
zombiezen opened this issue Sep 20, 2015 · 0 comments
Closed

Allow nil to be used for param functions #9

zombiezen opened this issue Sep 20, 2015 · 0 comments
Assignees

Comments

@zombiezen
Copy link
Contributor

From @zombiezen on August 26, 2015 0:19

Quite often, it's useful to have interface methods that have no parameters. It's somewhat unruly to write out:

promise := obj.NiladicFunc(ctx, func(p schema.Object_niladicFunc_Params) error {
  return nil
})

instead of the more concise:

promise := obj.NiladicFunc(ctx, nil)

Copied from original issue: zombiezen/go-capnproto#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant