Top 1.1% dependent packages on proxy.golang.org
Top 2.3% dependent repos on proxy.golang.org
proxy.golang.org : github.com/smartystreets/clock
Package clock is a near drop-in replacement for time.Now().UTC() and time.Sleep(). The structs defined here are intended to be used as pointer fields on struct types. When nil, these references forward to the corresponding functions in the standard time package. When not nil they perform behavior that facilitates unit testing when accessing the current time or sleeping is involved. The main advantage to this approach is that it is not necessary to provide a non-nil instance in 'contructor' functions or wireup for production code. It is also still trivial to set a non-nil reference in test code.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/smartystreets/clock
Keywords:
go
, mocking-utility
, testing-tools
, time
License: MIT
Latest release: about 4 years ago
First release: almost 6 years ago
Namespace: github.com/smartystreets
Dependent packages: 21
Dependent repositories: 5
Stars: 4 on GitHub
Forks: 1 on GitHub
Docker dependents: 1
Docker downloads: 15
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago