securecookie icon indicating copy to clipboard operation
securecookie copied to clipboard

Expose error types?

Open akerl opened this issue 7 years ago • 4 comments

It seems like the ideal behavior for a cookie w/ an expired timestamp would be for me to consider it equivalent to http.ErrNoCookie, but right now I can't find a clean way to check for that, since the types of errors are all private.

Am I missing a better workflow or existing clean way to check for this?

akerl avatar Apr 16 '18 02:04 akerl

I think since we have versioning available in Go I'd be more comfortable adding those to the public API. What do you think @elithrar ?

kisielk avatar May 26 '18 23:05 kisielk

Agree. This is something I’d like to refactor—and simplify—under my v2 rewrite. Error handling in Go is never straightforward and I don’t think the current approach in securecookie is ideal.

Moving to a v2 will still be slightly tricky, since there’s the conflict of “change import path” vs. “break Go users without a version-aware go get” - that’s something I need to assess in June.

On Sun, May 27, 2018 at 12:23 AM Kamil Kisiel [email protected] wrote:

I think since we have versioning available in Go I'd be more comfortable adding those to the public API. What do you think @elithrar https://github.com/elithrar ?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/gorilla/securecookie/issues/51#issuecomment-392294233, or mute the thread https://github.com/notifications/unsubscribe-auth/AABIcKM-clspvFvH8lUvBEUQ9xfjCxLhks5t2eP_gaJpZM4TVxVw .

elithrar avatar May 27 '18 08:05 elithrar

@elithrar any update about this ?

buchdag avatar Jul 07 '21 10:07 buchdag

Any movement here?

akerl avatar Oct 11 '22 23:10 akerl