textutil: PrefixLineWriter should make single-line writes.

I realized that the whole point of buffering in PrefixLineWriter
is to ensure each underlying Write call contains a full line.
That ensures that if we have multiple PrefixLineWriters writing
out to os.Stdout, we won't be interleaving separate lines.

Note that if we didn't need this property, we could implement
PrefixLineWriter without any buffering or Flush.

So I've changed PrefixLineWriter to ensure single-line-Write.
Also changed to add '\n' to unterminated data when flushed.

Change-Id: I682fac1066bb9989cb232008a7c67959cb2f730a
2 files changed
tree: 2c02f26b4b1b927a8de0c8cf62ea450130b3255b
  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