aboutsummaryrefslogtreecommitdiff
path: root/cmd/show-object
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 /cmd/show-object
parentobject/id: Nosec G505 for sha1 (diff)
signatureNo signature
object{,/type}: Fix up API shape v0.1.142
Diffstat (limited to 'cmd/show-object')
-rw-r--r--cmd/show-object/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/show-object/main.go b/cmd/show-object/main.go
index ee952876..b254ad52 100644
--- a/cmd/show-object/main.go
+++ b/cmd/show-object/main.go
@@ -15,7 +15,6 @@ import (
"codeberg.org/lindenii/furgit/object/stored"
"codeberg.org/lindenii/furgit/object/tag"
"codeberg.org/lindenii/furgit/object/tree"
- objecttype "codeberg.org/lindenii/furgit/object/type"
"codeberg.org/lindenii/furgit/repository"
)
@@ -92,7 +91,7 @@ func printStored(s *stored.Stored[object.Object]) {
id := s.ID()
ty := s.Object().ObjectType()
- tyName, ok := objecttype.Name(ty)
+ tyName, ok := ty.Name()
if !ok {
tyName = fmt.Sprintf("type %d", ty)
}
@@ -126,7 +125,7 @@ func printStored(s *stored.Stored[object.Object]) {
case *tag.Tag:
tag := obj
- targetTy, ok := objecttype.Name(tag.TargetType)
+ targetTy, ok := tag.TargetType.Name()
if !ok {
targetTy = fmt.Sprintf("type %d", tag.TargetType)
}