Skip to content

Commit 7dcc7f0

Browse files
committed
Use value.TypeString in TypeAssertion.String
The value.TypeString function is what the rest of the package uses and is slightly cleaner than using reflect.Type.String. Updates #305
1 parent 14ad8a0 commit 7dcc7f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmp/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ type typeAssertion struct {
284284

285285
func (ta TypeAssertion) Type() reflect.Type { return ta.typ }
286286
func (ta TypeAssertion) Values() (vx, vy reflect.Value) { return ta.vx, ta.vy }
287-
func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", ta.typ) }
287+
func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", value.TypeString(ta.typ, false)) }
288288

289289
// Transform is a transformation from the parent type to the current type.
290290
type Transform struct{ *transform }

0 commit comments

Comments
 (0)