go-sqlcmd icon indicating copy to clipboard operation
go-sqlcmd copied to clipboard

How to separate output channels (stdout/err) for the new modern CLI, what should the switches be

Open stuartpa opened this issue 3 years ago • 0 comments

Per output.go line 35:

var standardWriteCloser io.WriteCloser

"don't we need separate error and stdout channels? Most apps don't write everything to stdout, they use stderr too.

Legacy Sqlcmd also lets the user change where stdout and stderr write during app execution. Do you expect we'll keep that functionality with the new API such that this channel needs to support dynamic reassignment?" - David

"I started with two channels, but then didn't know what semantics to apply to do the separation, so I removed stderr to keep this PR contained." - Stuart

stuartpa avatar Nov 29 '22 08:11 stuartpa