Versions in this module Expand all Collapse all v1 v1.0.0 Aug 29, 2021 Changes in this version + const ChunkPrefix + const InputPrefix + const MarkDelete + const MarkInsert + const MetaIndex + const Space + func IsChunk(diffLine string) bool + func IsInput(diffLine string) bool + func IsLegend(diffLine string) bool + func IsMeta(diffLine string) bool + type Chunk struct + Header string + SourceRange *Range + TargetRange *Range + func NewChunk() *Chunk + func (c *Chunk) Parse(diffLine string) *Chunk + type Diff struct + Files []*File + func NewDiff() *Diff + func (d *Diff) Parse(diffText string) *Diff + type File struct + Chunks []*Chunk + Input *Input + Legends []*Legend + Metas []*Meta + Mode FileMode + func NewFile() *File + type FileMode int + const FileDeleted + const FileInserted + const FileModified + type Input struct + Source string + Target string + func NewInput() *Input + func (i *Input) Parse(diffLine string) *Input + type Legend struct + Content string + Mark string + func NewLegend() *Legend + func (l *Legend) Parse(diffLine string) *Legend + type Line struct + Mode LineMode + Number int32 + func (l *Line) LineMode(diffLine string) + type LineMode int + const DeletePrefix + const InsertPrefix + const LineDelete + const LineInsert + const LineUnchanged + type Meta struct + Content string + MetaType MetaType + func NewMeta() *Meta + func (m *Meta) Parse(diffLine string) *Meta + type MetaType string + type Range struct + Length int32 + Lines []*Line + Start int32