pp
pp copied to clipboard
Colored pretty printer for Go language
**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...
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.24.0 to 0.25.0. Commits 700cc20 go.mod: update golang.org/x dependencies See full diff in compare view [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as...