aboutsummaryrefslogtreecommitdiff
path: root/lib/text/chunk.go
AgeCommit message (Collapse)Author
10 daysall: apply go fixShulhan
2025-01-23all: use for-range with numericShulhan
Go 1.22 now support for-range on numeric value.
2023-09-11lib/text: fix linter warningsShulhan
Some changes, * add missing comment to method MarshalJSON in Chunk and Line * use consistent receiver name on Chunk and Line * rename variable "new" to "newline" to fix "redefinition of the built-in function new"
2023-09-11lib/text: realign struct for better size allocationShulhan
The realignment reduce the cost of the following struct, * Chunk: from 16 to 8 bytes (-8) * struct in TestChunk_MarshalJSON: from 40 to 32 bytes (-8) * diff.LineChange: from 96 to 88 bytes (-8) * Line: from 16 to 8 bytes (-8) * struct in TestLine_MarshalJSON: from 40 to 32 bytes (-8)
2022-09-07lib/text: replace json.Escape with strconv.QuoteShulhan
We want to prevent import cycle in the future, when the test package use the text/diff for display difference between string.
2022-08-28lib/text: add custom MarshalJSON to type Chunk and LineShulhan
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2021-07-30lib/text: implement Stringer on Chunk and Line typesShulhan
2018-09-17Merge package "github.com/shuLhan/tekstus/diff" to "text/diff"Shulhan