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

Add stack errorf function #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dmcgowan
Copy link
Member

Handles a common pattern when errors with stack are created.

Handles a common pattern when errors with stack are created.

Signed-off-by: Derek McGowan <[email protected]>
Comment on lines +205 to +207
func Errorf(format string, a ...any) error {
return joinErrors(nil, fmt.Errorf(format, a...))
}

Choose a reason for hiding this comment

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

Can we get this put into the main errdefs package as something like errdefs.New? Or something like errdefs.Errorf. I think this is the functionality we want, but I'd like it if it were easier to access and didn't require using a subpackage especially since stack is a bit of a generic name.

Copy link
Member

Choose a reason for hiding this comment

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

ping @dmcgowan

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.

3 participants