Comparing 2 structs in golang

I recently got a case where I needed to compare API resp from the prod and testing environment and look for any differences. the first thought that came to my mind was deep equal but I realized it is very slow In the case of nested structs and causes issues in the case of pointers.

has anyone ever faced the same issue? how did you solve it?

You can use reflect.DeepEqual() or create your own custom code to check fields in the structs. Maybe convert them to json or string to avoid recursion when going inside a inner struct