-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Possible to remove go-spew? #1061
Description
Since %#v/%+v were added to fmt (or keys now sort, or whatever the last critical change was), go-spew seems generally unnecessary (and unmaintained) these days, so thought I would start a discussion on removing it here.
Looking over the code, it doesn't look like it's critical here since you're disabling printing pointers and all. The losses would be indentation and MaxDepth as far as I can tell. For indentation, personally I prefer the compact form when checking a diff because it's very easy to see when the line changes vs trying to find it in a multiline form which requires jumping around and memorizing (or copying them to two separate files and actually using diff I guess).
However, one usage in assert/assertions.go actually uses difflib, so maybe json.MarshalIndent would be required for that, assuming it gets you everything you need.
For MaxDepth (in assert/assertions.go) I'm not knowledgeable enough here to say whether it matters or not. Perhaps with the representation being flat, it would matter less, but can't speak to the difflib usage wrt this.
