Documentation
¶
Overview ¶
Package diff implements the diff utility.
It compares two files line by line, writing the changes necessary to convert the first into the second, in one of the formats diff offers. An operand of "-" means the standard input, and a directory operand makes diff compare the files of the same name inside it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Prog ¶
Prog is the diff core utility.
func (*Prog) Run ¶
Run compares the operands line by line, writing the changes that turn each first file into its second. It returns an exit status of 1 when any comparison finds differences and 2 when any other error happens.
Comparisons are interrupted when ctx is done, and the context error is returned as-is.