Skip to content

Commit

Permalink
fix: applying feedback from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
tchung1118 committed Jul 1, 2024
1 parent 6075bd2 commit 26d26ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion dig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions internal/digclock/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 26d26ec

Please sign in to comment.