diff options
| author | 2026-03-29 10:22:19 +0000 | |
|---|---|---|
| committer | 2026-03-29 10:22:19 +0000 | |
| commit | cdac77529a3f7416843b1d455d413c9b0f21cfff (patch) | |
| tree | 274775de36c302716f43efdaffbb00ca5f3070f9 /object/id/algorithm_zero.go | |
| parent | object/id: Split files (diff) | |
| signature | No signature | |
object/id: Zero is a property of the algorithm v0.1.140
Diffstat (limited to 'object/id/algorithm_zero.go')
| -rw-r--r-- | object/id/algorithm_zero.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/object/id/algorithm_zero.go b/object/id/algorithm_zero.go new file mode 100644 index 00000000..e8c0abf2 --- /dev/null +++ b/object/id/algorithm_zero.go @@ -0,0 +1,11 @@ +package objectid + +// Zero returns the all-zero object ID for this algorithm. +func (algo Algorithm) Zero() ObjectID { + id, err := FromBytes(algo, make([]byte, algo.Size())) + if err != nil { + panic(err) + } + + return id +} |
