X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/0821d23c64f4ffc856760e4914fa39ba2e3260e4..baf7a940be8927278e3b4b87e7366cebfc16532f:/clock_test.go diff --git a/clock_test.go b/clock_test.go index 61437a5..32dfbb9 100644 --- a/clock_test.go +++ b/clock_test.go @@ -2,17 +2,17 @@ package main import "time" -// testClock is a clock that tests set by hand. -type testClock struct { +// TestClock is a clock that tests set by hand. +type TestClock struct { now time.Time } -func newTestClock() *testClock { - return &testClock{ - now: time.Date(2026, 1, 1, 12, 0, 0, 0, time.UTC), - } +func (c *TestClock) Now() time.Time { + return c.now } -func (c *testClock) Now() time.Time { - return c.now +func newTestClock() *TestClock { + return &TestClock{ + now: time.Date(2026, 1, 1, 12, 0, 0, 0, time.UTC), + } }