majohn-r / output

Go library to provide an easy way for command-line oriented programs to handle console and error writing and logging, as well as a simple way to verify what is written to those channels.
MIT License
0 stars 0 forks source link

Revamp console and error writing #25

Closed majohn-r closed 2 months ago

majohn-r commented 2 months ago

The WriteCanonical... functions take on too much responsibility for correcting output that, honestly, should be done by callers. In addition, the WriteConsole/WriteError functions act like they are for printing a line with newline termination (particularly as they handle list decorators) but do not ensure the output is terminated with a newline. This issue proposes:

New Bus interface functions:

with functionality patterned on the go-standard Printf/Println functions

Deleting:

majohn-r commented 2 months ago

Phase I complete. Now: phase II: delete the deprecated functions!