Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

skip printing empty rows in tablePrinter #301

Merged
merged 1 commit into from
May 31, 2024
Merged

skip printing empty rows in tablePrinter #301

merged 1 commit into from
May 31, 2024

Conversation

mwennrich
Copy link
Contributor

@mwennrich mwennrich commented May 15, 2024

Nicer output when using conditionals in template output.

Before:

$ cloudctl cluster ls -o template --template '{{ if eq .Networking.Type "cilium" }}{{ .Name }}{{end}}'






cilium

With this PR:

$ cloudctl ls -o template --template '{{ if eq .Networking.Type "cilium" }}{{ .Name }}{{end}}'
cilium

@Gerrit91
Copy link
Contributor

Tried to carry this over to the metal-lib because in the end I would like to use the printers from this library also for cloudctl.

@Gerrit91 Gerrit91 merged commit b7778f5 into master May 31, 2024
5 checks passed
@Gerrit91 Gerrit91 deleted the no-empty-rows branch May 31, 2024 09:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants