feat(ksuid): add Equal and IsZero for ApplyInterfacePtr

StringKSUID and BinaryKSUID now implement ApplyInterface with nil-nil
equality semantics, enabling ApplyInterfacePtr in patch logic. Adds nil
sentinel vars and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 18:24:07 -07:00
parent 0f8e79a890
commit cc44931ea9
6 changed files with 69 additions and 3 deletions
+7
View File
@@ -28,3 +28,10 @@ const (
ksuidBinaryLength = 20
ksuidStringLength = 27
)
func equalKSUID(lh, rh ksuid.KSUID) bool {
if lh.IsNil() && rh.IsNil() {
return true
}
return lh.String() == rh.String()
}