pp icon indicating copy to clipboard operation
pp copied to clipboard

Colored pretty printer for Go language

Results 5 pp issues
Sort by recently updated
recently updated
newest added

**The problem:** I have a struct with a bunch of populated fields. I want to print the struct in order to use it in my unit test as data input...

if an object has a type generated by protobuf, then the pp.Print() will show very very very long content on screen. It would be better to show the user-defined fields.

```go p := map[string]any{"name": 10, "age": 33} pp.Printf("address: %p\n", &p) /* print: %!p(string=&map[string]interface {}{ "age": 33, "name": 10, }) */ fmt.Printf("address: %p\n", &p) // print: 0xc00008a9a8 ```

https://godocs.io/fmt#Formatter like https://github.com/kr/pretty does

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...