File tree 2 files changed +9
-9
lines changed
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) {
127
127
} else if v , ok := x .(string ); ok {
128
128
return v
129
129
}
130
- return fmt .Sprintf ("%#v " , x )
130
+ return fmt .Sprintf ("<%p> " , x )
131
131
}
132
132
133
133
// 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() {
85
85
fmt .Println ("a7:" , a7 .String ())
86
86
fmt .Println ("a8:" , a8 .String ())
87
87
// 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)> " }
96
96
}
97
97
98
98
// Test that two attributes with the same content are Equal.
You can’t perform that action at this time.
0 commit comments