Previously, this returned an io.ErrUnexpectedEOF. This is not wrong, in
that we did unexpectedly hit the end of the input file, but it is vague
and implies a possible library bug rather than a problem with the patch
or the input. This condition is really a conflict, as the changes
described by the patch are not compatible with the state of the input.
The previous version of the golangci-lint action would install its own
version of Go, which eventually conflicted with the old pinned version
of the linter I was using. Upgrade the action to avoid this, but also
update Go and the linter while I'm here.
Remove the Applier type and replace it with TextApplier and
BinaryApplier, both of which operate on fragments instead of on full
files. Move the logic that previously existed in Applier.ApplyFile to
the top-level Apply function.
Also restructure arguments and methods to make it clear that appliers
are one-time-use objects. The destination is now set when creating an
applier and the Reset() method was replaced by Close().