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
common/TextTable,mgr: standardize on 2 spaces between table columns #33138
Conversation
liewegas
commented
Feb 8, 2020
* | ||
* @param s String to separate columns | ||
*/ | ||
void set_column_separation(const std::string& s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this method used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no callers
@@ -53,6 +53,7 @@ class TextTable { | |||
std::vector<TextTableColumn> col; // column definitions | |||
unsigned int curcol, currow; // col, row being inserted into | |||
unsigned int indent; // indent width when rendering | |||
std::string column_separation = {" "}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string column_separation = {" "}; | |
constexpr static std::string_view column_separation = {" "}; |
7c64882
to
592d692
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python code lgtm
6bfbebe
to
441a632
Compare
retest this please |
This is what other projects and libraries default to, and it is more legible. Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
441a632
to
eadd83d
Compare
retest this please |
No need to pad on the right-hand side if there are no additional columns that follow. Signed-off-by: Sage Weil <sage@redhat.com>
eadd83d
to
41f0035
Compare