Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
func laterInTime(days time.Duration, do func()) {
resetTime := func() {
jwt.TimeFunc = func() time.Time {
return time.Now()
}
}
defer resetTime()
jwt.TimeFunc = func() time.Time {
return time.Now().Add(time.Hour * 24 * days)
}
do()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.