-
Notifications
You must be signed in to change notification settings - Fork 109
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
Streamline signing API #233
Conversation
80fbb90
to
59c7fb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the names to be more passive voice (signed_by()?), since conceptually the params are what's being signed
I don't find the approach in this branch too awkward, but this option sounds a little bit better. Was there a reason you hesitated to select it up-front? I suppose it's more common for this sort of function to be named in an active tense?
Used |
d2a5e0d
to
9ef10af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the names you landed on 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self_signed
and signed_by
are good names!
IMO this is a more idiomatic API. I don't love the
sign_self()
name but haven't come up with anything better.Alternatives:
signed_by()
?), since conceptually the params are what's being signedKeyPair
instead -- this avoids the active/passive confusion but seems conceptually weird