Compare two sequences of lines; generate the delta as a context diff.

Context diffs are a compact way of showing line changes and a few lines of context. The number of context lines is set by diff.Context which defaults to three.

By default, the diff control lines (those with *** or ---) are created with a trailing newline.

For inputs that do not have trailing newlines, set the diff.Eol argument to "" so that the output will be uniformly newline free.

The context diff format normally has a header for filenames and modification times. Any or all of these may be specified using strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. The modification times are normally expressed in the ISO 8601 format. If not specified, the strings default to blanks.

WriteContextDiff is referenced in 0 repositories