aboutsummaryrefslogtreecommitdiff
path: root/oid
diff options
context:
space:
mode:
Diffstat (limited to 'oid')
-rw-r--r--oid/objectid.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/oid/objectid.go b/oid/objectid.go
index 92031d92..6507306e 100644
--- a/oid/objectid.go
+++ b/oid/objectid.go
@@ -141,18 +141,12 @@ func (id ObjectID) Size() int {
// String returns the canonical hex representation.
func (id ObjectID) String() string {
size := id.Size()
- if size == 0 {
- return ""
- }
return hex.EncodeToString(id.data[:size])
}
// Bytes returns a copy of the object ID bytes.
func (id ObjectID) Bytes() []byte {
size := id.Size()
- if size == 0 {
- return nil
- }
return append([]byte(nil), id.data[:size]...)
}