archive: Expose ChangeWriter to allow customized diff computing

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
ktock
2021-06-17 15:25:40 +09:00
parent ba70277fb7
commit 4a46ea2f4b
2 changed files with 25 additions and 8 deletions

View File

@@ -71,7 +71,7 @@ func TestOverlayApplyNoParents(t *testing.T) {
fstest.FSSuite(t, overlayDiffApplier{
tmp: base,
diff: func(ctx context.Context, w io.Writer, a, b string, _ ...WriteDiffOpt) error {
cw := newChangeWriter(w, b)
cw := NewChangeWriter(w, b)
cw.addedDirs = nil
err := fs.Changes(ctx, a, b, cw.HandleChange)
if err != nil {