davecgh / go-spew

Implements a deep pretty printer for Go data structures to aid in debugging
ISC License
5.98k stars 361 forks source link

Support for trailing commas on last element #54

Open ernesto-jimenez opened 7 years ago

ernesto-jimenez commented 7 years ago

Hi @davecgh,

Is it possible to setup spew to print a trailing comma for all elements in a map/array?

It would help with https://github.com/stretchr/testify/issues/288

Also, is it possible to do spew.Sprintf to print spew with a multi-line output and without pointers? to address https://github.com/stretchr/testify/issues/317

davecgh commented 7 years ago

The second one is now possible thanks to PR #56 from @atombender which I just merged to master. The first one is not currently possible (though I am not opposed to a config option for that either).

ernesto-jimenez commented 7 years ago

Thanks @atombender! :)