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

sessions: Clear doesn't return potential error #21

Closed
yanniszark opened this issue Oct 5, 2019 · 4 comments
Closed

sessions: Clear doesn't return potential error #21

yanniszark opened this issue Oct 5, 2019 · 4 comments
Assignees

Comments

@yanniszark
Copy link

Clear function in sessions.go doesn't handle the return value of the clear function.

j.clear(ctx, s.Key)

@abraithwaite
Copy link
Owner

Great point! Do you think the preference would be to simply add an error return value to the signature of the function?

Technically I think that should backwards compatible, but it might throw a few vet errors for some users.

@abraithwaite abraithwaite self-assigned this Oct 7, 2019
@yanniszark
Copy link
Author

@abraithwaite I believe that changing the signature of an exported function breaks compatibility.
Thanks for catching that!

I see two possible solutions:

  1. Break compatibility and bump the major version.
  2. Introduce another function, with the correct functionality.

@abraithwaite
Copy link
Owner

abraithwaite commented Oct 7, 2019

I don't think breaking compatibility is completely out of the question here. It's certainly not a major breaking change and would likely not result in builds failing for most users. Furthermore, I haven't tagged this as 1.0.0 yet, so minor breaking changes are definitely not outside the realm of possibility. :-)

I'm leaning towards just adding an error onto the signature unless I can think of a strong reason not to.

@abraithwaite
Copy link
Owner

Fixed in #25

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

No branches or pull requests

2 participants