Discover Packages
github.com/pyvvo/funcd
internal
platform
clock
package
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: Sep 30, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package clock is the canonical injected-dependency example (ADR-0002).
It provides the Clock interface so components can be tested with a
deterministic fake instead of wall-clock time.
type Clock interface {
Now() time .Time
}
Clock is the port for time operations. Components depend on this interface;
the app injects System() in production and a Fake in tests.
Fake returns a clock fixed at the given time — useful for deterministic tests.
System returns the real-time clock.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.