From a041d523de389b65b98a5373a8034041db2a8d83 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Thu, 2 Apr 2026 06:23:30 +0000 Subject: *: Remove --- object/id/objectid_frombytes.go | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 object/id/objectid_frombytes.go (limited to 'object/id/objectid_frombytes.go') diff --git a/object/id/objectid_frombytes.go b/object/id/objectid_frombytes.go deleted file mode 100644 index ea8dacfe..00000000 --- a/object/id/objectid_frombytes.go +++ /dev/null @@ -1,20 +0,0 @@ -package objectid - -import "fmt" - -// FromBytes builds an object ID from raw bytes for the specified algorithm. -func FromBytes(algo Algorithm, b []byte) (ObjectID, error) { - var id ObjectID - if algo.Size() == 0 { - return id, ErrInvalidAlgorithm - } - - if len(b) != algo.Size() { - return id, fmt.Errorf("%w: got %d bytes, expected %d", ErrInvalidObjectID, len(b), algo.Size()) - } - - copy(id.data[:], b) - id.algo = algo - - return id, nil -} -- cgit v1.3.1-10-gc9f91