A Go library for parsing and applying patches generated by git diff, git show, and git format-patch.
git diff
git show
git format-patch
Several libraries with similar functionality already exist, so why make another?
No other libraries I found support binary diffs, as generated with the --binary flag. This is the main reason for writing a new library.
--binary
Most other libraries only parse patches, so you need something else to apply them (and if they do support applies, it is only for text files.)
The goal is to eventually accept anything that git apply accepts, based on the code in apply.c.
git apply
apply.c
It seemed like a fun thing to write.