Registry / testing / tilinna-clock

tilinna-clock

JSON →
library1.1.0gogounverified

Package clock implements a library for mocking time in Go applications.

go get github.com/tilinna/clock
INSTALL
IMPORT
SIG · TILINNA-CLOCK
T
tilinna-clock
testinggov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

clock
github.com/tilinna/clock

Use a mock clock to control time

package main import ( "fmt" "time" "github.com/tilinna/clock" ) func main() { mock := clock.NewMock() mock.Set(time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)) fmt.Println(mock.Now()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
tilinna-clock — go get tilinna-clock · libregistry