lib: Add gosh.Pipeline, simplify AddStd{out,err}Writer.

This CL introduces a new Pipeline concept to gosh.  The idea is
similar to bash command pipelines; you can connect a sequence of
commands together, with stdout and/or stderr of one command
connected to the stdin of the next command.  The Pipeline API is
similar to the Cmd API, with unnecessary methods removed, and
with Pipe{Stdout,Stderr,CombinedOutput} methods to construct the
pipeline.

Also simplified Cmd.AddStd{out,err}Writer semantics, by changing
the argument from io.WriteCloser to io.Writer.  We no longer
automatically close these writers on exit.  This means we can now
write AddStdoutWriter(os.Stdout) without needing
gosh.NopWriteCloser, which has been removed.

If you need to close your writer, you are responsible for calling
close at the appropriate point in the code yourself.

MultiPart: 3/4

Change-Id: I3885b5eae997100dbf6f876818e1c9a1297f17b7
6 files changed
tree: a902ff17a0bcc1a258f2cdfa340385ca7e9dd24a
  1. cmd/
  2. cmdline/
  3. dbutil/
  4. envvar/
  5. gosh/
  6. host/
  7. ibe/
  8. metadata/
  9. netconfig/
  10. netstate/
  11. set/
  12. textutil/
  13. timing/
  14. toposort/
  15. vlog/
  16. .gitignore
  17. .godepcop
  18. AUTHORS
  19. CONTRIBUTING.md
  20. CONTRIBUTORS
  21. LICENSE
  22. PATENTS
  23. README.md
  24. VERSION
README.md

This repository contains general purpose libraries used by the Vanadium project. TEST