Versions in this module Expand all Collapse all v0 v0.0.8 Jun 20, 2025 Changes in this version + func ElideUnifiedDiff(diff string, contextLines int) string + func GenerateElidedUnifiedDiff(oldContent, newContent []byte, filename string, contextLines int) string + type DiffLine struct + Content string + NewLine int + OldLine int + Type DiffLineType + func ParseUnifiedDiff(diff string) []DiffLine + type DiffLineType int + const DiffLineAdd + const DiffLineContext + const DiffLineElided + const DiffLineHeader + const DiffLineLocation + const DiffLineRemove + type FileCache struct + func New() *FileCache + func (fc *FileCache) Cleanup() + func (fc *FileCache) GenerateDiff(pid uint32, fd int32, pathHash uint32, offset uint64, newContent []byte) (string, bool) + func (fc *FileCache) GenerateUnifiedDiff(pid uint32, fd int32, pathHash uint32, offset uint64, newContent []byte, ...) (string, bool) + func (fc *FileCache) GetContentForDiff(pid uint32, fd int32, pathHash uint32, offset uint64) (*FileContent, bool) + func (fc *FileCache) Size() int + func (fc *FileCache) StoreReadContent(pid uint32, fd int32, pathHash uint32, content []byte, offset uint64) + func (fc *FileCache) UpdateWriteContent(pid uint32, fd int32, pathHash uint32, content []byte, offset uint64) + type FileContent struct + Content []byte + Hash string + Offset uint64 + Size uint64 + Timestamp time.Time