shithub: furgit

ref: 3ce59c3248dec0eb0f918c42f37f53bc2ac20425
dir: /object/id/objectid_compare.go/

View raw version
package objectid

import "bytes"

// Compare lexicographically compares two object IDs by their canonical byte
// representation.
func Compare(left, right ObjectID) int {
	return bytes.Compare(left.RawBytes(), right.RawBytes())
}