Bug#1012123: ITP: golang-github-bep-clock -- Golang clock that allows you to set the start time (Go library)
Package: wnpp
Severity: wishlist
Owner: Anthony Fok <foka@debian.org>
* Package name : golang-github-bep-clock
Version : 0.3.0-1
Upstream Author : Bjørn Erik Pedersen
* URL : https://github.com/bep/clock
* License : Expat
Programming Lang: Go
Description : Golang clock that allows you to set the start time (Go library)
This package provides a *ticking clock* that allows you to set the start
time. It also provides a system clock, both implementing this interface:
.
// Clock provides a subset of methods in time.Time
type Clock interface {
Now() time.Time
Since(t time.Time) time.Duration
Until(t time.Time) time.Duration
.
// Offset returns the offset of this clock relative to the system clock
Offset() time.Duration
}
.
Note that this only support a subset of all the methods in time.Time
(see above) and is by design very simple. For a more advanced time mocking
library, have a look at <https://github.com/benbjohnson/clock>.
Reason for packaging: Needed by Hugo v0.99.0 and above
Reply to: