davecgh / go-spew

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

Added a spew tag name with a very basic implementation #95

Open muudyguy opened 5 years ago

muudyguy commented 5 years ago

I am opening this PR as a suggestion to add the ability to remove some fields from being printed. If this already exists, forgive me for not having noticed it.

The usage would be

type AStruct struct {
    Field int `spew:"-"`
}

and the field would be omitted.

The implementation is basic and dirty, but let me know if you'd consider it, we can make it pretty.

muudyguy commented 5 years ago

Anyone has any comment on this ?