Description
In #12 I suggested to add a separate sub package called unix
with an API similar to the unix coreutils commands. This issue was closed with the suggestion to implement this in it's own package/library, separated from this package.
So I tried to figure out, what would be the best way to do this and therefore I wanted to reach out to you (@bitfield and all other followers of this package) to discuss, how this could be done.
My goal is to leverage this package, especially the Pipe
and be able to combine (in an as nice as possible way) functions from this package (e.g. script.Freq()
) with functions from an other package (e.g. unix.Head()
).
I looked at the example in the README but this does not work in a seperate package, because you can not add new methods to an type defined in an other package.
So the question is, what is the best way to approach this?