From 5da80869bce6a40584de32d8c18e10411b93db63 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 6 Mar 2026 11:17:28 +0800 Subject: diff/lines: Split files --- diff/lines/chunk.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 diff/lines/chunk.go (limited to 'diff/lines/chunk.go') diff --git a/diff/lines/chunk.go b/diff/lines/chunk.go new file mode 100644 index 00000000..b5856d29 --- /dev/null +++ b/diff/lines/chunk.go @@ -0,0 +1,20 @@ +package lines + +// Chunk represents a contiguous region of lines categorized +// as unchanged, deleted, or added. +type Chunk struct { + Kind ChunkKind + Data []byte +} + +// ChunkKind enumerates the type of diff chunk. +type ChunkKind int + +const ( + // ChunkKindUnchanged represents an unchanged diff chunk. + ChunkKindUnchanged ChunkKind = iota + // ChunkKindDeleted represents a deleted diff chunk. + ChunkKindDeleted + // ChunkKindAdded represents an added diff chunk. + ChunkKindAdded +) -- cgit v1.3.1-10-gc9f91