Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Defer tabOut.Flush #804

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

edwinakatosh
Copy link

When running stolonctl status, i'm seeing the following output:

UID     HEALTHY PG LISTENADDRESS        PG HEALTHY      PG WANTEDGENERATION     PG CURRENTGENERATION
keeper0 true    10.1.0.36:5432          true            4                       4
keeper1 true    10.1.0.47:5432  true    2       2

instead of

UID     HEALTHY PG LISTENADDRESS        PG HEALTHY      PG WANTEDGENERATION     PG CURRENTGENERATION
keeper0 true    10.1.0.36:5432          true            2                       2
keeper1 true    10.1.0.47:5432          true            2                       2

Example: https://play.golang.org/p/K9kBnGbYBEE

@edwinakatosh
Copy link
Author

@sgotti Please review and advise.

Copy link
Member

@sgotti sgotti left a comment

Choose a reason for hiding this comment

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

@edwinakatosh Thanks for the PR and sorry for being late.
We could clean it up without doing multiple defer but just doing a tabOut.Flush at the end of all the writing to tabOut in renderText and also remove the unused tabOut defined here.

@edwinakatosh
Copy link
Author

I think i had tested that, but i'll confirm and update. Thanks @sgotti

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

Successfully merging this pull request may close these issues.

None yet

2 participants