Skip to content

Commit

Permalink
Moved WithStarted into test code
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Jul 29, 2024
1 parent f30fcdc commit f78b2c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ func WithStrategies(strategies ...strategy.Strategy) ConfigOption {
o.strategies = strategies
}
}
func WithStarted(startedAt time.Time) ConfigOption {
return func(o *configOption) {
o.started = &startedAt
}
}

// WithStorage specifies which storage implementation the repository should use for storing feature
// toggles.
Expand Down
6 changes: 6 additions & 0 deletions metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ import (
"github.com/stretchr/testify/mock"
)

func WithStarted(startedAt time.Time) ConfigOption {
return func(o *configOption) {
o.started = &startedAt
}
}

func TestMetrics_RegisterInstance(t *testing.T) {
assert := assert.New(t)
defer gock.OffAll()
Expand Down

0 comments on commit f78b2c5

Please sign in to comment.