File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ func str(x any) (s string) {
127127 } else if v , ok := x .(string ); ok {
128128 return v
129129 }
130- return fmt .Sprintf ("%#v " , x )
130+ return fmt .Sprintf ("<%p> " , x )
131131}
132132
133133// MarshalJSON helps implement the json.Marshaler interface, thereby rendering
Original file line number Diff line number Diff line change @@ -85,14 +85,14 @@ func ExampleAttributes_String() {
8585 fmt .Println ("a7:" , a7 .String ())
8686 fmt .Println ("a8:" , a8 .String ())
8787 // Output:
88- // a1: {"attributes_test.key{} ": "<nil>" }
89- // a2: {"attributes_test.key{} ": "<nil>" }
90- // a3: {"attributes_test.key{} ": "(*attributes_test.stringVal)(nil) " }
91- // a4: {"attributes_test.key{} ": "<nil>" }
92- // a5: {"attributes_test.key{} ": "1 " }
93- // a6: {"attributes_test.key{} ": "two" }
94- // a7: {"attributes_test.key{} ": "attributes_test.stringVal{s:\" two\"} " }
95- // a8: {"1 ": "true" }
88+ // a1: {"<%!p( attributes_test.key={})> ": "<nil>" }
89+ // a2: {"<%!p( attributes_test.key={})> ": "<nil>" }
90+ // a3: {"<%!p( attributes_test.key={})> ": "<0x0> " }
91+ // a4: {"<%!p( attributes_test.key={})> ": "<%!p(< nil>) >" }
92+ // a5: {"<%!p( attributes_test.key={})> ": "<%!p(int=1)> " }
93+ // a6: {"<%!p( attributes_test.key={})> ": "two" }
94+ // a7: {"<%!p( attributes_test.key={})> ": "<%!p( attributes_test.stringVal={ two})> " }
95+ // a8: {"<%!p(int=1)> ": "<%!p(bool= true)> " }
9696}
9797
9898// Test that two attributes with the same content are Equal.
You can’t perform that action at this time.
0 commit comments