From 6dc764106962a029d7dd9b1af1efd5521ce70b0a Mon Sep 17 00:00:00 2001 From: Michael Boulton Date: Tue, 18 Aug 2020 08:11:15 +0100 Subject: [PATCH] Make apply callback types have more conssitent names --- diff.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/diff.go b/diff.go index 2e9bf58..abb2ec1 100644 --- a/diff.go +++ b/diff.go @@ -849,16 +849,16 @@ func DiffBlobs(oldBlob *Blob, oldAsPath string, newBlob *Blob, newAsPath string, return nil } -type ApplyHunkCb func(*DiffHunk) (apply bool, err error) -type ApplyDeltaCb func(*DiffDelta) (apply bool, err error) +type ApplyHunkCallback func(*DiffHunk) (apply bool, err error) +type ApplyDeltaCallback func(*DiffDelta) (apply bool, err error) // ApplyOptions has 2 callbacks that are called for hunks or deltas // If these functions return an error, abort the apply process immediately. // If the first return value is true, the delta/hunk will be applied. If it is false, the delta/hunk will not be applied. In either case, the rest of the apply process will continue. type ApplyOptions struct { Version uint - ApplyHunkCallback ApplyHunkCb - ApplyDeltaCallback ApplyDeltaCb + ApplyHunkCallback ApplyHunkCallback + ApplyDeltaCallback ApplyDeltaCallback Flags uint }