From d4242ecef77b6ce478101ce83d741326d4a67435 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 16 Nov 2025 00:00:00 +0000 Subject: Make ObjectType look like a pointer-receiver in the docs --- obj_blob.go | 3 ++- obj_commit.go | 3 ++- obj_tag.go | 3 ++- obj_tree.go | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/obj_blob.go b/obj_blob.go index 45d412ff..d3be2f23 100644 --- a/obj_blob.go +++ b/obj_blob.go @@ -8,7 +8,8 @@ type Blob struct { } // ObjectType allows Blob to satisfy the Object interface. -func (*Blob) ObjectType() ObjectType { +func (blob *Blob) ObjectType() ObjectType { + _ = blob return ObjBlob } diff --git a/obj_commit.go b/obj_commit.go index 2b87322f..628a188a 100644 --- a/obj_commit.go +++ b/obj_commit.go @@ -18,7 +18,8 @@ type Commit struct { } // ObjectType allows Commit to satisfy the Object interface. -func (*Commit) ObjectType() ObjectType { +func (commit *Commit) ObjectType() ObjectType { + _ = commit return ObjCommit } diff --git a/obj_tag.go b/obj_tag.go index 31018c2c..8c5981e9 100644 --- a/obj_tag.go +++ b/obj_tag.go @@ -17,7 +17,8 @@ type Tag struct { } // ObjectType allows Tag to satisfy the Object interface. -func (*Tag) ObjectType() ObjectType { +func (tag *Tag) ObjectType() ObjectType { + _ = tag return ObjTag } diff --git a/obj_tree.go b/obj_tree.go index 66fdb8bd..2ebe8af7 100644 --- a/obj_tree.go +++ b/obj_tree.go @@ -21,7 +21,8 @@ type TreeEntry struct { } // ObjectType allows Tree to satisfy the Object interface. -func (*Tree) ObjectType() ObjectType { +func (tree *Tree) ObjectType() ObjectType { + _ = tree return ObjTree } -- cgit v1.3.1-10-gc9f91