Is there an existing issue for this?
Current Behavior
Currently, the New function only returns a non-nil pointer to a SecureCookie even if an error occured, making it impossible to handle failure if a bad hash/block key is passed.
Expected Behavior
There should be a way to know if something went wrong
Possible solutions:
- Expose the
err property of SecureCookie
- Have
New return an error
- Return a nil pointer if an error occurs
Steps To Reproduce
s := securecookie.New(hashKey, []byte{}) // invalid block key
Anything else?
No response
Is there an existing issue for this?
Current Behavior
Currently, the
Newfunction only returns a non-nil pointer to aSecureCookieeven if an error occured, making it impossible to handle failure if a bad hash/block key is passed.Expected Behavior
There should be a way to know if something went wrong
Possible solutions:
errproperty ofSecureCookieNewreturn an errorSteps To Reproduce
Anything else?
No response