Merge pull request #652 from peco/document-buffer-sealing

doc tweak
This commit is contained in:
lestrrat 2026-02-17 12:03:14 +09:00 committed by GitHub
commit 0c55a69065
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -479,7 +479,10 @@ type RangeStart struct {
}
// Buffer interface is used for containers for lines to be
// processed by peco.
// processed by peco. The unexported linesInRange method seals this
// interface to the peco package — external packages cannot implement it.
// This is intentional: linesInRange is an internal optimization for
// efficient pagination in NewFilteredBuffer, not part of the public contract.
type Buffer interface {
linesInRange(int, int) []line.Line
LineAt(int) (line.Line, error)