()
| 658 | } |
| 659 | |
| 660 | func ExampleEvent_Stringers() { |
| 661 | log := zerolog.New(os.Stdout) |
| 662 | |
| 663 | // net.IP values implement fmt.Stringer and can be used with StringersV |
| 664 | a := net.IP{127, 0, 0, 1} |
| 665 | b := net.IP{127, 0, 0, 2} |
| 666 | ips := []net.IP{a, b} |
| 667 | |
| 668 | log.Log(). |
| 669 | Stringers("ips", zerolog.AsStringers(ips)). |
| 670 | Msg("hello world") |
| 671 | // Output: {"ips":["127.0.0.1","127.0.0.2"],"message":"hello world"} |
| 672 | } |
| 673 | |
| 674 | func ExampleContext_StringersV() { |
| 675 | // net.IP values implement fmt.Stringer and can be used with StringersV |
nothing calls this directly
no test coverage detected