diff --git a/callback.go b/callback.go index 6abc57d8..ba0c36b6 100644 --- a/callback.go +++ b/callback.go @@ -35,7 +35,7 @@ type CallbackInfo struct { // this will be set to a [PanicError] when the function panics. Error error - // Runtime contains the duration of time it took for the associated + // Runtime contains the duration it took for the associated // function to run. Runtime time.Duration } diff --git a/dig_test.go b/dig_test.go index e2f5bc67..b8f4a374 100644 --- a/dig_test.go +++ b/dig_test.go @@ -1798,7 +1798,7 @@ func TestCallback(t *testing.T) { } func TestCallbackRuntime(t *testing.T) { - t.Run("provided ctor runtime", func(t *testing.T) { + t.Run("constructor runtime", func(t *testing.T) { var called bool mockClock := digclock.NewMock() diff --git a/internal/digclock/clock.go b/internal/digclock/clock.go index 8c7d2d10..e38c55c3 100644 --- a/internal/digclock/clock.go +++ b/internal/digclock/clock.go @@ -25,7 +25,6 @@ import ( ) // Clock defines how dig accesses time. -// We keep the interface pretty minimal. type Clock interface { Now() time.Time Since(time.Time) time.Duration @@ -48,7 +47,7 @@ func (systemClock) Since(t time.Time) time.Duration { // It implements standard time operations, but allows // the user to control the passage of time. // -// Use the [Add] method to progress time. +// Use the [Mock.Add] method to progress time. // // Note that this implementation is not safe for concurrent use. type Mock struct {