From 0ffb905dcb02fdb8f58fc3825a22a6f29eddcf89 Mon Sep 17 00:00:00 2001 From: Maxim Vladimirskiy Date: Thu, 14 May 2026 10:45:45 +0300 Subject: [PATCH] Add WithStack --- stack.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stack.go b/stack.go index 0e9cfac..013fdc8 100644 --- a/stack.go +++ b/stack.go @@ -20,6 +20,13 @@ func Stack(err error) error { } } +// WithStack exactly the same as Stack. An alternative name for Stack is +// provided to make this library a drop-in replacement for +// github.com/pkg/errors and github.com/mailgun/holster/v4/errors. +func WithStack(err error) error { + return Stack(err) +} + type stack struct { error *callstack.CallStack