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

Consider making the Stringers function generic? #551

Open
fgimian opened this issue May 7, 2023 · 0 comments
Open

Consider making the Stringers function generic? #551

fgimian opened this issue May 7, 2023 · 0 comments

Comments

@fgimian
Copy link

fgimian commented May 7, 2023

Hey there, would you consider making Stringers generic similar to zap as seen at https://github.com/uber-go/zap/blob/master/array_go118.go#L145 ?

This would make it possible to pass a slice of any type which implements String() as opposed to having to allocate a new slice of fmt.Stringer in the current implementation.

I believe the behavioural change won't be a breaking change for existing users and only make the function more flexible, but it will mean that Go 1.18+ would be required.

Please let me know what you think 😄
Fotis

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

1 participant