You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The single Applier type does some messy internal state tracking to avoid mixing ApplyFile, ApplyTextFragment, and ApplyBinaryFragment. I think the following would be better:
Create a TextApplier (in apply_text.go) and BinaryApplier (in apply_binary.go). Each of these has methods to apply single fragments (and multiple fragments, in the case of TextApplier.)
Remove the Reset method and rename Flush to Close to better indicate that apply types are single-use
Remove the Applier type and the ApplyFile method
Move the logic for ApplyFile to the global Apply function. This is the convenience function to select an applier based on the file type and execute it.
This should reduce confusion and provides an obvious place for the eventual text-only options for fuzzy apply.
The text was updated successfully, but these errors were encountered:
The single
Applier
type does some messy internal state tracking to avoid mixingApplyFile
,ApplyTextFragment
, andApplyBinaryFragment
. I think the following would be better:TextApplier
(inapply_text.go
) andBinaryApplier
(inapply_binary.go
). Each of these has methods to apply single fragments (and multiple fragments, in the case ofTextApplier
.)Reset
method and renameFlush
toClose
to better indicate that apply types are single-useApplier
type and theApplyFile
methodApplyFile
to the globalApply
function. This is the convenience function to select an applier based on the file type and execute it.This should reduce confusion and provides an obvious place for the eventual text-only options for fuzzy apply.
The text was updated successfully, but these errors were encountered: