Skip to content

Commit

Permalink
use value receive
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong committed Feb 18, 2024
1 parent 0033cf4 commit 7028958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sampling/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Handler struct {
}

// New creates a new Handler with the given Option(s).
func New(handler slog.Handler, sampler func(ctx context.Context) bool, opts ...Option) *Handler {
func New(handler slog.Handler, sampler func(ctx context.Context) bool, opts ...Option) Handler {
if handler == nil {
panic("cannot create Handler with nil handler")
}
Expand All @@ -66,7 +66,7 @@ func New(handler slog.Handler, sampler func(ctx context.Context) bool, opts ...O
},
}

return &option.Handler
return option.Handler
}

func (h Handler) Enabled(ctx context.Context, level slog.Level) bool {
Expand Down

0 comments on commit 7028958

Please sign in to comment.