From c05f718ebf0cc997dea73ddbdee3b80a85b70a88 Mon Sep 17 00:00:00 2001 From: Arpad Ryszka Date: Wed, 4 Mar 2026 21:22:35 +0100 Subject: [PATCH] code formatting --- lib.go | 2 +- lib_test.go | 6 +++--- sys.go | 2 +- test.go | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib.go b/lib.go index b3b1905..6bf3536 100644 --- a/lib.go +++ b/lib.go @@ -16,7 +16,7 @@ type Clock interface { // TestClock is a test implementation of the Clock interface. On top of the Clock methods, it adds the // possibility to manually step time or to virtually jump to a specified time. -type TestClock struct{ +type TestClock struct { clock test } diff --git a/lib_test.go b/lib_test.go index f59a144..418bdce 100644 --- a/lib_test.go +++ b/lib_test.go @@ -1,10 +1,10 @@ package times_test import ( - "testing" "code.squareroundforest.org/arpio/times" - "time" "sort" + "testing" + "time" ) func TestSys(t *testing.T) { @@ -212,7 +212,7 @@ func TestTest(t *testing.T) { var a []<-chan time.Time for _, d := range initOrder { - a = append(a, c.After(d * time.Millisecond)) + a = append(a, c.After(d*time.Millisecond)) } sort.Slice(a, func(i, j int) bool { return initOrder[i] < initOrder[j] }) diff --git a/sys.go b/sys.go index ee1dc1f..a93b6e7 100644 --- a/sys.go +++ b/sys.go @@ -2,7 +2,7 @@ package times import "time" -type sys struct {} +type sys struct{} func (sys) Now() time.Time { return time.Now() diff --git a/test.go b/test.go index 52489fa..f819123 100644 --- a/test.go +++ b/test.go @@ -1,13 +1,13 @@ package times import ( - "time" "sort" + "time" ) type clockState struct { - current time.Time - chans map[time.Time][]chan<- time.Time + current time.Time + chans map[time.Time][]chan<- time.Time chantlist []time.Time } @@ -19,7 +19,7 @@ func makeTestClock(initial time.Time) test { s := make(chan clockState, 1) s <- clockState{ current: initial, - chans: make(map[time.Time][]chan<- time.Time), + chans: make(map[time.Time][]chan<- time.Time), } return test{state: s}