k0kubun/pp

features suggestions

Opened this issue · 1 comments

hi,
I started to use this nice lib.
It would be nice to have a function :
func (pp *PrettyPrinter) SetMaxDepth(depth int) {
pp.maxDepth = depth
}
so that we can build different printers with different depths.
It would be nice too to have an option to force the representation of some kinds of variables, like force []byte to string.
or even time.Time to string instead of going deeper ?
cheers
jf

Sounds good. Could put the definition around

pp/pp.go

Lines 140 to 154 in 6f55b4d

func (pp *PrettyPrinter) SetColoringEnabled(enabled bool) {
pp.coloringEnabled = enabled
}
func (pp *PrettyPrinter) SetDecimalUint(enabled bool) {
pp.decimalUint = enabled
}
func (pp *PrettyPrinter) SetExportedOnly(enabled bool) {
pp.exportedOnly = enabled
}
func (pp *PrettyPrinter) SetThousandsSeparator(enabled bool) {
pp.thousandsSeparator = enabled
}
in a pull request?