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 PrintDAG should take either a PrinterFunc(line string) as an argument, or an io.Writer so you can control what the function prints to. I noticed the comments on the PrintDAG function even mention a printerFunc.
Might be a small niche use-case but as an experimental use of the crdt Datastore I've made an HTTP server that takes a go-datastore interface and exposes a basic API, it would be nice to be able to print the DAG and return it over the API. At the moment my only options are using my own fork that implements one of these two options, or some janky stdout copy/buffer stuff (don't want to do).
Thoughts?
The text was updated successfully, but these errors were encountered:
That function is not really used (I used it mostly for debugging at the beginning). It doesn't even work very well (printing a multi-branched DAG is pretty horrible).
I'm happy changing it to whatever fits your needs. Would you like to make a PR?
The PrintDAG should take either a PrinterFunc(line string) as an argument, or an io.Writer so you can control what the function prints to. I noticed the comments on the PrintDAG function even mention a printerFunc.
Might be a small niche use-case but as an experimental use of the crdt Datastore I've made an HTTP server that takes a go-datastore interface and exposes a basic API, it would be nice to be able to print the DAG and return it over the API. At the moment my only options are using my own fork that implements one of these two options, or some janky stdout copy/buffer stuff (don't want to do).
Thoughts?
The text was updated successfully, but these errors were encountered: