I'm not a huge fan of config objects, and functional options are used in many other places in these packages. It'd be easier to maintain backwards compatibility. There are already functional options for ClientOption, which could either be applied as a part of a ProfilerOption or sent through on a start func.
func NewProfiler(opts ...ProfilerOption) (*Profiler, error) {
...
}
func (p *Profiler) Start(opts ...ClientOption) error {
...
}
I'm not a huge fan of config objects, and functional options are used in many other places in these packages. It'd be easier to maintain backwards compatibility. There are already functional options for
ClientOption, which could either be applied as a part of aProfilerOptionor sent through on a start func.