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

cmd: Support -s to simplify calls to use New/Errorf #21

Open
prashantv opened this issue Nov 22, 2023 · 2 comments
Open

cmd: Support -s to simplify calls to use New/Errorf #21

prashantv opened this issue Nov 22, 2023 · 2 comments

Comments

@prashantv
Copy link
Contributor

errtrace.Wrap(errors.New(..)) can be simplified into errtrace.New(...)

Similarly, errtrace.Wrap(fmt.Errorf(...)) can be simplified into errtrace.Errorf(...)

@abhinav
Copy link
Contributor

abhinav commented Nov 22, 2023

Note that this will be a slight change in the errtrace transformation concepts:
It's currently modeled as "inserts" that only add at specific positions.
It'll need to change to "edits" that operate over a [start, end) text range it's replacing/modifying.

@abhinav
Copy link
Contributor

abhinav commented Nov 22, 2023

With #23, if/when we add -s, it should treat -format=auto as "always"

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

No branches or pull requests

2 participants