google / go-cmp

Package for comparing Go values in tests
BSD 3-Clause "New" or "Revised" License
4.17k stars 209 forks source link

Ideas for a v2 #338

Open dsnet opened 1 year ago

dsnet commented 1 year ago

Overall, this package has held up well. If we were to ever consider a v2, here are some changes:

dprotaso commented 12 months ago

It would be good if we could control whether the library panics or returns an error -

Knative has wrapped this library to handle that https://github.com/knative/pkg/blob/d0a82f9cbb8f2f92ce8f130c701f2da29bb33109/kmp/diff.go#L41

Sung123zaaaa commented 11 months ago

https://github.com/google/go-cmp/issues/338#issuecomment-1750773032

zchee commented 10 months ago

@dsnet v2 is roughly accepts backwards incompatible change. So would be happy if rename cmp package name to something (e.g., gocmp, or gcmp means Google Compare library...?) for conflicts stdlib cmp package.