Make apply callback types have more conssitent names

This commit is contained in:
Michael Boulton 2020-08-18 08:11:15 +01:00
parent 37e56c28a8
commit 6dc7641069
No known key found for this signature in database
GPG Key ID: 8A62CA0BE2E0197E
1 changed files with 4 additions and 4 deletions

View File

@ -849,16 +849,16 @@ func DiffBlobs(oldBlob *Blob, oldAsPath string, newBlob *Blob, newAsPath string,
return nil return nil
} }
type ApplyHunkCb func(*DiffHunk) (apply bool, err error) type ApplyHunkCallback func(*DiffHunk) (apply bool, err error)
type ApplyDeltaCb func(*DiffDelta) (apply bool, err error) type ApplyDeltaCallback func(*DiffDelta) (apply bool, err error)
// ApplyOptions has 2 callbacks that are called for hunks or deltas // ApplyOptions has 2 callbacks that are called for hunks or deltas
// If these functions return an error, abort the apply process immediately. // 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. // 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 { type ApplyOptions struct {
Version uint Version uint
ApplyHunkCallback ApplyHunkCb ApplyHunkCallback ApplyHunkCallback
ApplyDeltaCallback ApplyDeltaCb ApplyDeltaCallback ApplyDeltaCallback
Flags uint Flags uint
} }