Skip to content

Conversation

@casperrafn
Copy link
Contributor

@casperrafn casperrafn commented Jan 3, 2025

Changing Sign func to work on time.Time, instead of duration.

@leg100
Copy link
Owner

leg100 commented Jan 3, 2025

If I understand correctly, is this PR adding the ability to specify an expiry time, rather than a duration from now?

@casperrafn
Copy link
Contributor Author

@leg100 Yes.

Maybe the func name could be better..

@leg100
Copy link
Owner

leg100 commented Jan 3, 2025

Maybe the func name could be better..

I think so.

In hindsight, I should have defaulted to your behaviour, and let the caller calculate their own duration, should they wish to do that. (Using time.Now inside a library is possibly a bad omen...). I might release a /v2.

@casperrafn
Copy link
Contributor Author

That would be awesome!

Changing Sign func to work on time.Time, instead of duration.
@casperrafn casperrafn force-pushed the add_sign_with_expiry branch from bb6f545 to 50d277b Compare January 3, 2025 12:22
@casperrafn casperrafn changed the title feat(add SignWithExpiry func) feat(change Sign func to work on time.Time) Jan 3, 2025
@leg100 leg100 changed the title feat(change Sign func to work on time.Time) feat!: change Sign func to work on time.Time Jan 4, 2025
@leg100 leg100 merged commit 9455ea6 into leg100:main Jan 4, 2025
1 check failed
@leg100
Copy link
Owner

leg100 commented Jan 4, 2025

Looks good @casperrafn!

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

Successfully merging this pull request may close these issues.

2 participants