]> git.giacomolli.uk - onechat/blobdiff - clock_test.go
Fix two comments of the Telegram API and the view
[onechat] / clock_test.go
index 61437a57afd08be81a4d96331c8b57d2280fdf4b..32dfbb969039b67f7178993595a84d2b50281d84 100644 (file)
@@ -2,17 +2,17 @@ package main
 
 import "time"
 
 
 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
 }
 
        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),
+       }
 }
 }