#551·zerolog

Consider making the Stringers function generic?

Author: fgimianCreated May 7, 2023Updated Jun 13, 2026

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