New functions were copy-pasted from existed one, but with a slightly different argument list, so it accepts io.Reader instead of fileName string.
The difference is that instead of filename it sets -, and cmd.stdin = reader
P.S. possible todo in case if it's approved: refactor it, so we have a new function that can do both fileName/reader, and the old function becomes deprecated and it calls the new one
New functions were copy-pasted from existed one, but with a slightly different argument list, so it accepts
io.Reader
instead offileName string
.The difference is that instead of
filename
it sets-
, andcmd.stdin = reader
P.S. possible todo in case if it's approved: refactor it, so we have a new function that can do both fileName/reader, and the old function becomes deprecated and it calls the new one