timego provides custom helpers to handle tasks related to time.
You can use the go get method:
go get github.com/dalikewara/timegoYou can check all available helper functions through the related files above (add.go, diff.go, etc).
For example, if you want to create a variable that stores expired time value, you can do like this:
timeNow := timego.Now()
expiredTimeAt := timego.AddMinutes(timeNow, 5)and to check the expiration time, you can do:
if timego.IsExpired(timeNow, expiredTimeAt) {
panic("time expired!")
}Read at CHANGELOG.md
Copyright © 2023 Dali Kewara