aboutsummaryrefslogtreecommitdiff
path: root/errors
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 10:55:24 +0000
committerGravatar Runxi Yu2026-03-29 10:55:24 +0000
commit9da262c92189e4007834bf2023f0c032f2a1a0d9 (patch)
tree47eeae7b32fa1d24ab6cfdf942352ef7f566afc5 /errors
parentobject/id: Nosec G505 for sha1 (diff)
signatureNo signature
object{,/type}: Fix up API shape v0.1.142
Diffstat (limited to 'errors')
-rw-r--r--errors/type.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/errors/type.go b/errors/type.go
index 19bdf3cd..bf3ba110 100644
--- a/errors/type.go
+++ b/errors/type.go
@@ -17,12 +17,12 @@ type ObjectTypeError struct {
// Error implements error.
func (e *ObjectTypeError) Error() string {
- gotName, gotOK := objecttype.Name(e.Got)
+ gotName, gotOK := e.Got.Name()
if !gotOK {
gotName = fmt.Sprintf("type(%d)", e.Got)
}
- wantName, wantOK := objecttype.Name(e.Want)
+ wantName, wantOK := e.Want.Name()
if !wantOK {
wantName = fmt.Sprintf("type(%d)", e.Want)
}