Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new type for targets #19

Open
tpam28 opened this issue Nov 26, 2020 · 2 comments
Open

new type for targets #19

tpam28 opened this issue Nov 26, 2020 · 2 comments

Comments

@tpam28
Copy link

tpam28 commented Nov 26, 2020

Hello everyone.
I want to ask you why this library uses string type for targets, not a Stringer interface or other. I think devs more often have to search in a slice of objects than in an array of raw strings. I suppose that this change type for targets will be useful.

@lithammer
Copy link
Owner

lithammer commented Dec 1, 2020

No particular reason. It seemed obvious at the time. It's a shame string doesn't implement Stringer, otherwise it would be an easy thing to change 🤷‍♂️ Now it would be a backwards-incompatible change, which I'm not super keen on making.

I will consider adding a new set of functions that mirror the existing ones but accepts Stringer instead of string though 🤔

@tpam28
Copy link
Author

tpam28 commented Dec 1, 2020

I'd say that probably new a set of functions maybe looks a boilerplate code.
I suggest thinking about a creation v2 package version includes incompatible change.
Anyway, thank you for paying attention to this topic.

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

No branches or pull requests

2 participants