Skip to content

Conversation

@sampaioletti
Copy link

Hello,

I had a project where I was using your library, but needed different matching than path.Match (our strings have "/" in them, but are not paths).

So I pulled the match functionality out into an interface to make it easier to override. Thought I'd push it back and see if it was useful.

Thanks for the cool library.

@razorness
Copy link

Is there any reason why this is not getting merged?

@olebedev olebedev self-requested a review September 11, 2020 08:15
Copy link
Owner

@olebedev olebedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intention looks good to me. I would prefer to keep the API non-broken. I've left a comment below, ptal

}
// optionally include a matcher to use or nil to use the default
// which implements path.Match() from the system library
func New(capacity uint, matcher Matcher) *Emitter {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about to create another function/constructor, like:

func NewWithMatcher(capacity uint, matcher Matcher) *Emitter {

or make it a variadic function, like:

func New(capacity uint, matcher ...Matcher) *Emitter {

rather than introducing a broken change?

I would prefer to don't change the existing library's API if it's not a but fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants