Skip to content
This repository has been archived by the owner on May 8, 2023. It is now read-only.

Print status without formatting if not to terminal #175

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

jsharps-yext
Copy link

@jsharps-yext jsharps-yext commented Mar 18, 2019

Enables other tools to read the output of edward status

Too bad I didn't see anything to get rid of those pesky padding spaces in my quick investigation

lol account mixup but whatever

Enables other services to read the output of edward status
@jsharps-yext
Copy link
Author

Alternatives:

Create an interface for the formatter and make the tablewriter one implementer and some quick dealio doo that pops out "foo\tbar\tbaz\n" the other implementation. (kinda like this more than what I have)

Flagging on something instead of controlling behavior via output device (don't really care all that much)

Also for this to be truly useful the "a new edward version" message should be suppressed when not outputting to terminal

@jsharps-yext
Copy link
Author

Uploaded the interface one that I liked better because I liked it better.

"strings"
)

type tablePrinter interface {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this could live in the terminal package, and define a statusPrinter rather than being table specific?

rows [][]string
}

func NewPlainPrinter(out *os.File) *plainPrinter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For versatility, this could be io.Writer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants