diff options
| author | Shulhan <ms@kilabit.info> | 2026-04-12 19:07:51 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-04-12 19:08:21 +0700 |
| commit | 26a02a8396684fcb58f4ba431ae5ae799eb35d68 (patch) | |
| tree | 0d6da4a081edaff24d8c22048122ca92ac23429c /lib/text/diff/linechanges.go | |
| parent | bfa79cf52d62418f622289cee7c1fe5807c73be6 (diff) | |
| download | pakakeh.go-26a02a8396684fcb58f4ba431ae5ae799eb35d68.tar.xz | |
text/diff: remove LineChanges
Defining []T as new type does not help on readability only make it
confusing for future maintenances.
Diffstat (limited to 'lib/text/diff/linechanges.go')
| -rw-r--r-- | lib/text/diff/linechanges.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/text/diff/linechanges.go b/lib/text/diff/linechanges.go deleted file mode 100644 index 5549f568..00000000 --- a/lib/text/diff/linechanges.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// SPDX-FileCopyrightText: 2018 Shulhan <ms@kilabit.info> - -package diff - -import ( - "git.sr.ht/~shulhan/pakakeh.go/lib/text" -) - -// LineChanges represents a set of change in text. -type LineChanges []LineChange - -// GetAllDels return all deleted chunks. -func (changes *LineChanges) GetAllDels() (allDels text.Chunks) { - for _, change := range *changes { - allDels = append(allDels, change.Dels...) - } - return -} - -// GetAllAdds return all addition chunks. -func (changes *LineChanges) GetAllAdds() (allAdds text.Chunks) { - for _, change := range *changes { - allAdds = append(allAdds, change.Adds...) - } - return -} |
