aboutsummaryrefslogtreecommitdiff
path: root/object/type/name.go
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 /object/type/name.go
parentobject/id: Nosec G505 for sha1 (diff)
signatureNo signature
object{,/type}: Fix up API shape v0.1.142
Diffstat (limited to 'object/type/name.go')
-rw-r--r--object/type/name.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/object/type/name.go b/object/type/name.go
index 870ac1e4..d5636be9 100644
--- a/object/type/name.go
+++ b/object/type/name.go
@@ -7,8 +7,8 @@ const (
typeNameTag = "tag"
)
-// ParseName parses a canonical Git object type name.
-func ParseName(name string) (Type, bool) {
+// Parse parses a canonical Git object type name.
+func Parse(name string) (Type, bool) {
switch name {
case typeNameBlob:
return TypeBlob, true
@@ -24,7 +24,7 @@ func ParseName(name string) (Type, bool) {
}
// Name returns the canonical Git object type name.
-func Name(ty Type) (string, bool) {
+func (ty Type) Name() (string, bool) {
switch ty {
case TypeBlob:
return typeNameBlob, true