MCPcopy
hub / github.com/google/go-cmp / ExampleReporter

Function ExampleReporter

cmp/example_reporter_test.go:40–59  ·  cmp/example_reporter_test.go::ExampleReporter
()

Source from the content-addressed store, hash-verified

38}
39
40func ExampleReporter() {
41 x, y := MakeGatewayInfo()
42
43 var r DiffReporter
44 cmp.Equal(x, y, cmp.Reporter(&r))
45 fmt.Print(r.String())
46
47 // Output:
48 // {cmp_test.Gateway}.IPAddress:
49 // -: 192.168.0.1
50 // +: 192.168.0.2
51 //
52 // {cmp_test.Gateway}.Clients[4].IPAddress:
53 // -: 192.168.0.219
54 // +: 192.168.0.221
55 //
56 // {cmp_test.Gateway}.Clients[5->?]:
57 // -: {Hostname:americano IPAddress:192.168.0.188 LastSeen:2009-11-10 23:03:05 +0000 UTC}
58 // +: <invalid reflect.Value>
59}

Callers

nothing calls this directly

Calls 4

StringMethod · 0.95
EqualFunction · 0.92
ReporterFunction · 0.92
MakeGatewayInfoFunction · 0.70

Tested by

no test coverage detected