Skip to content

Commit

Permalink
rename WithEnabledFn to WithEnabledFunc
Browse files Browse the repository at this point in the history
  • Loading branch information
dmathieu committed Apr 3, 2024
1 parent 108a6a1 commit 254b7cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions log/logtest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ type optFunc func(config) config

func (f optFunc) apply(c config) config { return f(c) }

// WithEnabledFn allows configuring whether the recorder enables specific log entries or not.
// WithEnabledFunc allows configuring whether the recorder enables specific log entries or not.
//
// By default, every log entry will be enabled.
func WithEnabledFn(fn enabledFn) Option {
func WithEnabledFunc(fn enabledFn) Option {
return optFunc(func(c config) config {
c.enabledFn = fn
return c
Expand Down
2 changes: 1 addition & 1 deletion log/logtest/recorder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func TestRecorderEnabled(t *testing.T) {
{
name: "with everything disabled",
options: []Option{
WithEnabledFn(func(context.Context, log.Record) bool {
WithEnabledFunc(func(context.Context, log.Record) bool {
return false
}),
},
Expand Down

0 comments on commit 254b7cc

Please sign in to comment.