fix: add a new internal printer #25
Loading…
Reference in a new issue
No description provided.
Delete branch "the-internal-printer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a new internal printer package for printing resources to the screen or pager.
The new printer type stores information such as the colour theme, the pager to intergrate with (if applicable), whether ANSI colour output is disabled, etc. This saves us the trouble of passing an increasing number of parameters to an increasing number of
Display
methods throughout the code base.The internal printer package replaces the old
Displayer
interface, theDisplay
methods in the model package, and the format functions in the utilities package. The format functions have migrated to the printer package.Also, the existing indentation used when displaying resources such as statuses and the instance is removed.
The version info now also supports colour output.
Add a top level flag for max terminal width and add a min width set to 40.
Remove new line char.
Don't forget to check REUSE compliance with reuse lint.
fix: add a new internal printerto WIP: fix: add a new internal printerHow are we dealing with errors with the new printer?
@ -0,0 +133,4 @@
builder.WriteString("\n")
printToStdout(builder.String())
Should be p.print()
@ -0,0 +48,4 @@
builder.WriteString("\n\n")
printToStdout(builder.String())
Should be p.print()
07c3b31ce1
toccdd8b6530
WIP: fix: add a new internal printerto fix: add a new internal printer