You can also use the reflect package rather than (directly) reaching for unsafe. The reflect.DeepEqual function does something along the lines of: https://go.dev/play/p/IVt0Z-mxugh
On Tuesday, July 18, 2023 at 10:45:18 AM UTC-4 Jan Mercl wrote: > On Tue, Jul 18, 2023 at 4:35 PM Jochen Voss <joche...@gmail.com> wrote: > > > Is there a better way? > > I have never been here and please don't do this: > https://go.dev/play/p/x4QYJubXMnQ > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/073e5b30-5b4d-4125-9651-757c9bb96b6cn%40googlegroups.com.