internal: add comby bindings
Created by: rvantonder
The core addition here is the function PipeTo, which takes a comby.types.Args and writer, runs comby with Args, and pipes stdout into the writer. This is the last component toward getting the initial end-to-end structural search code path.
Notes:
-
I am keeping the API minimal for now. Both replacer and searcher only need to be able to write results onto an http writer. The raw results will be unmarshaled in the frontend (like we currently do for replacer). I will add the "result type" definitions in a subsequent diff.
-
These bindings will substitute for all call outs to comby (including current replacer code). Is
internal/combythe correct place to put this package? -
The test duplicates a
newStorehelper function which exists insearcherandreplacer. I will deduplicate these in a separate clean-up diff and plan to put shared functions ininternal/testutil. -
More testing to come when I use these in the context of searcher and replacer--
PipeTois not yet called by any reachable code.