Skip to content

Ui: add format-string alternatives to functions#225

Merged
lbajolet-hashicorp merged 1 commit intomainfrom
ui_convenience_methods
Mar 14, 2024
Merged

Ui: add format-string alternatives to functions#225
lbajolet-hashicorp merged 1 commit intomainfrom
ui_convenience_methods

Conversation

@lbajolet-hashicorp
Copy link
Copy Markdown
Contributor

The say/error/ask methods on Ui only accept formatted strings, which is a bit cumbersome to do at callsite every time we need to print out something formatted with dynamic information.

To reduce that cumbersomness, we add some convenience alternatives to the Ui implementations in the SDK, so they now expose Sayf, Askf and Errorf in addition to the rest.

The say/error/ask methods on Ui only accept formatted strings, which is
a bit cumbersome to do at callsite every time we need to print out
something formatted with dynamic information.

To reduce that cumbersomness, we add some convenience alternatives to
the Ui implementations in the SDK, so they now expose Sayf, Askf and
Errorf in addition to the rest.
@lbajolet-hashicorp lbajolet-hashicorp added the enhancement New feature or request label Mar 12, 2024
@lbajolet-hashicorp lbajolet-hashicorp requested a review from a team as a code owner March 12, 2024 21:18
Copy link
Copy Markdown
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

Nice addition. This looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants