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

Ui: add format-string alternatives to functions #225

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

lbajolet-hashicorp
Copy link
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
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.

@lbajolet-hashicorp lbajolet-hashicorp merged commit d970fb9 into main Mar 14, 2024
9 checks passed
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