A conventional pattern in tests is to use the cmp package and the following pattern:
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("<descriptive error message referring to got and want>")
Ideally this should be followed in all tests and much as possible.
A conventional pattern in tests is to use the cmp package and the following pattern:
Ideally this should be followed in all tests and much as possible.