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

✨ RawError, RawActivity simplified. #458

Merged
merged 1 commit into from
Jul 25, 2023
Merged

Conversation

jortel
Copy link
Contributor

@jortel jortel commented Jul 25, 2023

This PR simplifies the API for use cases for which the new RawError() and RawActivity() were meant to support.

Especially the RawActivity(). The main case here is to report multi-line activity. In this case the activity is reporting something followed by multiple lines. The first line is the-activity followed by multiple-lines of detail. This PR simplifies this more than the RawActivity() because it can be achieved in (1) addon.Activity() call.

For example:

addon.Activity("Doing something with a list of things:\n%s", "One\nTwo\nThree")

Results in:

- Doing something with a list of things:
- > One
- > Two
- > Three

The Error and RawError is achieved by reversing which is the edge case. Errorf() is added (instead of RawError) which makes for a more intuitive API.

Copy link
Collaborator

@mansam mansam left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants